方法一:以single模式进入字符界面重置密码

1:系统开机出现如下画面时:

72b1a2d7ac4ec4e488ea37a73b1972ce.png

2.按e键进入如下:

6dea43a9e2b90b2f255265170d2af4c4.png

3.按e键进入如下:

262648209b704849763d996851b7c9f5.png

4.按e键进入如下:

f5aeb6d1526cd9dd7efef354dc3e43ed.png

5.在末尾加上字符“ single”   (注意空格)

b9a0b0edb2b05fd2d222143c0917fdf8.png

6.按回车进入如下:

409a3c53fb541f7b7b14d56a611ba7c7.png

7.按b键引导系统进入如下:

fc4183e170db3d7b191654335e2d3857.png

8.输入修改密码命令:passwd root

6c1f388a33c972f003c1e5d706965187.png

9.密码修改结束后重启

fcc9340bf1fbe4b43b00ffd6be3d96bf.png

10.重启开机后可使用root账户密码成功登入

60d9f4b0fb678a49806394ac8ac9531f.png

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

方法二:以其它用户登入并使用sudo命令修改root用户密码

1.[huqp@vmhost root]$ sudo passwd root

2.[sudo] password for huqp:

---------------输入完成之后若提示“huqp is not in the sudoers file.  This incident will be reported.”,

---------------则参考博文:xxxis not in the sudoers file.  This incident will be reported 的解决方法

3.Changing password for user root.

New UNIX password:

4.BAD PASSWORD: it does not contain enough DIFFERENT characters

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

提示修改成功!!!

Logo

更多推荐