Recovering root password
Problem:
You have forgotten the root password for a debian machine.
Solution:
1. On the grub book screen type ‘e’ for edit.
2. Edit the line starting with linux, at the end add init=/bin/bash. Hit enter when done. Then hit ‘b’ to boot it.
3. Now you should be at a prompt. You need to mount as read writable your root partition so that the changes you make can take effect. Type
root@comp# mount -o remount,rw / root@compp# passwd
4. Enter the new password twice. Then type
root@comp# sync root@comp# reboot
(if the reboot does not work just power off)
5. Start up the machine and see if you can log in as root.
Source
http://ivan.kanis.fr/recovering-root-password-on-debian-and-grub2.html
http://www.debiantutorials.org/reset-root-password-debian-gnulinux-etch-286.html
Categories: debian
reset root password
very interesting, good point