Cent OS 密码恢复
五月 11th, 2010 Posted in Centos | 阅读次数: 689 次
Author:gaojinbo
Time:2010-5-11
很多时候忘记了系统密码,或是密码记录在一个文件里面没办法登录系统,按照以下方法便能很容易的重置root密码。 此方法适合所有centos/rhel系统,linux root密码恢复
Cent OS密码恢复的具体方法.(注:设置了GRUB密码此方法不适用)
1.开机后进入GRUB画面如下图所示:
2.输入"E"编辑内核行。然后便可看到如下图所示的屏幕:
3.用箭头键选中 kernel 开始的行,按"E"键编辑内核参数。到达如下图所示的屏幕时,按图中所示,在参数后面加1就可以进入单用户模式进行密码恢复:
4.按"Enter" 回到GRUB介面,然后按"B"键,引导系统,内核会启动到单用户模式。运行 passwd 命令,更改用户根密码:
sh-3.00# passwd
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully
此时密码已经成功恢复,重启后,就可以用新的密码进行登录了
完成!
相关日志:
Tags: Centos
五月 9th, 2011 at 21:40
Recent Favourite Sites…
[...]below you’ll see my links page http://www.yeastinfectiontreatmentcure.net/links/ with some good sites that I think you should definitely go visit[...]…
九月 15th, 2011 at 12:18
Sites we Like………
[...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]………