Lost root password

If none of the more specific forums is the right place to ask

Lost root password

Postby denise » 2004-04-02 10:00

I didn't need my root password for a long time now.
But now I need it again but I forgot it.
Can somebody help me please?
denise
 
Posts: 34
Joined: 2004-02-17 13:39

Postby lacek » 2004-04-02 12:38

This is how to do it:

Boot from the Debian CD, and after the install starts, press ALT+F2 (to switch to that console), and press enter. You'll get a shell.
Mount your root partition to /mnt.
Edit /mnt/etc/shadow. The first line looks like this:
root:$1$A(...garbage...)J3/:12324:0:99999:7:::
Remove all the characters between the first and the second colon. You have to end up with this line:
root::12324:0:99999:7:::

If you're done, unmount the root partition from the /mnt directory, and reboot your computer. The root will have no password.
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable