Ubuntu16.04 修改登录root密码(开机密码)

时间:2022-09-25 16:14:32

在此介绍关于如何来修改Ubuntu16.04系统的开机密码,之前使用很多方法都没有修改成功,具体步骤如下:

(1)开机时进入引导界面,界面每行的内容:

              Ubuntu

              Ubuntu高级选项

              Memory test (memtest 86+)

              Memory test (memtest 86+,serial console 115200)

(2)选择第二项( Ubuntu高级选项),按回车键,将会出现如下界面:

                    Ubuntu,Linux4.4.0-21-generic

              Ubuntu,with Linux4.4.0-21-generic (upstart)

              Ubuntu,with Linux4.4.0-21-generic (recovery mode)

(3)选择第三项 (recovey mode) , 按 “e” 键进行编辑:

在出现的界面中找到 “recovery nomodeset” 并将其替换为:quiet splash rw init=/bin/bash        按 “F10” 键。


(4)系统进入命令行模式:

输入:passwd   用户名            按回车键进行修改密码


如:root(none):/# passwd  yongcai

                        Enter new UNIX password:123456

                        Retype new UNIX password:123456


出现提示:Passwd:passwd updated successfully 。   表示修改成功


(5)此时只需要重新启动,使用修改后的登录密码登录即可。