修改被遗忘的root密码

今天有一位同事问,root密码忘记了怎么办,需要重装么?当然不需要。重设密码的方法很简单,下面就以CentOS 6.0为例:

先重新启动系统,在出现倒计时界面时按下任意键。

Press-Any-Key-To-Enter-The-Menu

然后会出现以下界面:

Gnu-Grub

按下e键进入Grub编辑模式:

Gnu-Grub-Kernel

将光标移动到kernel这行,再次按下e,在以下界面命令行的最后方输入 single 并回车,返回启动界面后按 b 启动。

Single

然后就进入了单人维护模式,输入 passwd 命令设置新密码即可:

New-Password

声明: 本文采用 BY-NC-SA 协议进行授权. 转载请注明转自: 修改被遗忘的root密码
  1. No comments yet.
  1. No trackbacks yet.

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).