Ubuntu下如何修改root默认密码
Ubuntu安装后root是没有默认的密码的,因为你还没给root设置密码,你第一个 user 是在 admin 组 ,所以他可以给 root 设置密码,发法如下:
sudo passwd root
[sudo] password for you :---> 输入你的密码,(不会显)
Enter new UNIX password: --- > 设置root 密码
Retype new UNIX password: --> 重复
我用此方法修改成功了:
yuexingtian@yuexingtian-laptop:~$ sudo -i
[sudo] password for yuexingtian:
root@yuexingtian-laptop:~# pwd
/root
root@yuexingtian-laptop:~# sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@yuexingtian-laptop:~#
阅读(2494) | 评论(0) | 转发(0) |