4

给 Ubuntu 设定默认 root 用户的密码

 2 years ago
source link: https://hellodk.cn/post/175
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

给 Ubuntu 设定默认 root 用户的密码

如果你装完 ubuntu 系统后创建的用户名是个个性的用户名,之后的使用中,当需要输入 root 用户的密码时,一时间是不是有点懵逼???因为你从来没有设定过 root 用户的密码

解决办法来了。你设定的第一个 user 在 admin 组当中(本文的例子是 test),登录这个账号然后给 root 用户设置密码:

$ sudo passwd root
[sudo] password for test:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

然后你就可以执行 su -l any_username 了

su 是 switch user 的缩写,-l 参数是 login 的缩写


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK