LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Root Password! (https://www.linuxquestions.org/questions/linux-newbie-8/root-password-234591/)

p0rtzer0 09-24-2004 12:53 AM

Root Password!
 
Hi..
i have forgotten my root password,
what should i do to retrieve it?

realjustin 09-24-2004 01:18 AM

Not much you can do besides MD5 brute force to recover it. But since you have physical access, you can circumvent it. One way is to try to boot into single user mode from GRUB or Lilo, by adding 1 to the end of the boot parameter. Look up which line to add it to to whichever boot loader you have. On some distros this will boot into a root shell that you can do whatever you want, and if so you can reset your root password to whatever you want. Option two might be to boot into a live disk, mount your root partition, then edit the file /etc/shadow. Copy the second field, between the two : : marks of a user you know their password into the second field for the root user's password. Then your root will have the password that whoever you copied into their line.

serz 09-24-2004 01:20 AM

There are so many threads on the same subject...

http://www.linuxquestions.org/questi...der=descending

You need to boot into single user mode, or use a LiveCD to chroot your partition and change the root password.


All times are GMT -5. The time now is 11:49 AM.