linux root 密码忘了怎么办?

 
linux root 密码忘了怎么办?
2016-09-26 18:36:10 /故事大全

1、在Grub的引导装载程序菜单上,选择你要进入的条目,键入 “e” 来进入编辑模式;

2、在第二行(类似于kernel /vmlinuz-2.6.15 ro root=/dev/hda2 ),键入”e”进入编辑模式;

3、在句末加上”init=/bin/bash”,回车;

4、按“b”启动系统。

这样我们即可获得一个bash的shell,进入shell后,根分区的挂载模式默认是只读,我们要将其改为可写,否则不能更改root密码:

mount -no remount,rw /

passwd root

sync

mount -no remount,ro /

reboot

这样即可成功更改debian的root用户的密码。

所属专题:
如果您觉得本文或图片不错,请把它分享给您的朋友吧!

 
搜索
 
 
广告
 
 
广告
 
故事大全
 
版权所有- © 2012-2025 · 故事大全 SITEMAP站点地图-Foton Auman手机看故事 站点地图-Foton Auman