Derwynd's Weblog

Derwynd's Weblog

Debian Squeeze change root password

== Method 1 ==

Boot into grub, select single user but do not press enter.
Press e to bring you into edit mode.
Scroll down to the kernel line, it starts with “linux /boot/vmlinuz-2.6…….”
Scroll to the end of that line and press space key once and type


Press Crtl x to boot

$ remount / as rw

$ mount -rw -o remount /

Change password with

$ passwd

type your new password, hit enter and reboot.

== Method 2 ==
Boot from another installation of Debian. (One can use a LiveCD to get access to the “/” partition.)
Then, mount the partition where you have Squeeze’s “/”, then changed directory to /mnt/etc
Used vim as an editor to edit the file shadow.
It found the line starting with root:
Deleted everything between the first and second colons, and voila’,

Reboot as root without a password.
At the end use passwd to set a new root password.


April 14, 2011 Posted by | Uncategorized | 6 Comments