前段时间忙着搞其他的电脑,冷落了这台Debian,现在可好root密码也记不得了:
1.在grub选项下选择您要进入的条目 "Debian GNU/Linux, kernel ...",按e进入编辑模式
2.在第二行,编辑 "kernel /boot/vmlinuz ...",按e进入编辑模式
3.在句末加上”init=/bin/bash”,回车
4.按“b”启动系统,这样我们即可获得一个bash的shell.进入shell后,根分区的挂载模式默认是只读,
我们要将其改为可写,否则不能更改root密码,进入后执行下列指令:
#Su -
[email=root@(none]root@(none[/email]
)# mount -no remount,rw /
[email=root@(none]root@(none[/email]
)# mount -a
[email=root@(none]root@(none[/email]
)# passwd root
[email=root@(none]root@(none[/email]
)# reboot
哈哈,搞定,打完收工!