轻松破解root口令

目的:

突然有一天,你可能把root的口令给遗忘了,怎么办?答案是:你可以通过采用这个方法来解决。
步骤:

1、 编辑grub菜单,进入单用户模式;

2、 在单用户模式中,通过passwd命令来更改root口令,并使用exit退出该模式;

3、 重启系统,用新root口令进行登陆验证。


具体步骤如下:

1.进入单用户模式

⑴系统引导至grub菜单时,选择“Red Hat Linux”行,按“e”键;

⑵选择“kernel”行,按“e”键;

⑶运行至此时,在该行字符末,紧接着输入一个空格和“single”后并回车;

⑷选择“kernel”行字符,按“b”键。

2.用passwd命令更改root口令,并使用exit退出该模式


sh-2.05b#passwd root

Changing password for user root.


New password: //输入新的root口令

Retype new password: //再次输入新的root口令

passwd:all authentication tokens updated successfully. //说明系统接受了你输入的口令

sh-2.05b#exit

3. 用新root口令进行登陆验证

重启系统,让其自动引导至用户登陆界面之后,依次输入root及新口令,即可登陆。

你可能感兴趣的:(root)