Home > debian > Recovering root password

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 Tags:
  1. December 29, 2012 at 1:45 pm

    very interesting, good point

  1. No trackbacks yet.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.