忘了root密码怎么找回来?

来源:百度知道 编辑:UC知道 时间:2024/06/04 23:29:21

我正在学习linux
看下,我操作一边看可以不

PS:

Operate as following:
[1]on Grub menu ,enter “e” to edit
[2]you can see this line:“kernel /vmlinuz-2.6.25...”,enter "e" again
[3]attach the key word "single" to the end of the line ,then enter "b" to reboot the PC
[4]you will get into the shell "sh-2.X #"
[5]change the shadow mode to have the right to write:chmod 600 /etc/shadow
[6]rebuild the passwd :passwd root
[7]input your new passwd twice,reboot,that's ok!