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

init=/bin/bash

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’,
root::$6$fsdsdgdsg74.:14862:0:99999:7:::

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

Advertisements

April 14, 2011 - Posted by | Uncategorized

6 Comments »

  1. Great!!! Simple and perfect!

    Many thanks

    Comment by Luca | February 3, 2012 | Reply

  2. Great post. Only, some people might think “remount / as rw ” is a command to be typed, whereas the actual command is the next line, “mount -rw -o remount /”.

    Comment by ddcampayo | July 5, 2012 | Reply

  3. thanks man !!

    Comment by BrainStuck | August 23, 2012 | Reply

  4. excellent, you just saved our ….. server 😀 thanx a million.

    Comment by Walid Abu Saifan | September 20, 2012 | Reply

  5. […] you are required to change the root password of your debian squeeze just have a look at this page https://derwynd.com/2011/04/14/debian-squeeze-change-root-password/. However “$ remount / as rw” is not a command to be typed in at the terminal, it is […]

    Pingback by Debian Squeeze: Change Root Password | TechStuff | March 28, 2013 | Reply

  6. Reblogged this on TechStuff and commented:
    Well, I just like to reblog this on, so I can be sure I can get back to this 😉

    Comment by frankhesse | March 28, 2013 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: