Windows 10 - Bash (Ubuntu) SU(根密码)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37609356/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows 10 - Bash (Ubuntu) SU (Root Password)
提问by Dave Hamilton
Recently updated to Windows 10, installed Ubuntu Bash. Wanted to start configuring, But I have hit a wall already.
最近更新到 Windows 10,安装了 Ubuntu Bash。想开始配置,但我已经碰壁了。
When installed, you are asked for a username and password for your account. This creates a user level.
安装后,系统会要求您输入帐户的用户名和密码。这将创建一个用户级别。
Is it possible to access to root user, SU?
是否可以访问 root 用户 SU?
Every time I try, it asks for a password, and none of the accounts on the PC work (i.e., Windows 10 admin account password does not work). Tried default passwords too etc., all fail.
每次我尝试时,它都会要求输入密码,但 PC 上的所有帐户都不起作用(即 Windows 10 管理员帐户密码不起作用)。也试过默认密码等,都失败了。
The reason for it is when looking at the users home directory: When creating a file, it creates it under my Windows User Account (Permissions).
原因是在查看用户主目录时:创建文件时,它会在我的 Windows 用户帐户(权限)下创建它。
But when I view files created from Bash, they are created for Root user.
但是当我查看从 Bash 创建的文件时,它们是为 Root 用户创建的。
So this is the confusion, I modified bashrc
and it's no longer owned by root, So it's not accessible.
所以这是混乱,我修改了bashrc
它不再归root所有,所以它不可访问。
But I cannot login to root to create or modify the files.
但是我无法登录到 root 来创建或修改文件。
Am I being a complete noob or something?
When bashrc
is not owned by Root, when loading Bash.exe
, I get .bashrc Input/output error
.
当bashrc
不归 Root 所有,加载时Bash.exe
,我得到.bashrc Input/output error
.
回答by Matteo
as far as i know you'll have to type "sudo su"
据我所知你必须输入“sudo su”