LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   change root password (https://www.linuxquestions.org/questions/linux-newbie-8/change-root-password-503461/)

padmakar 11-20-2006 11:56 PM

change root password
 
how to change the root password without knowing the earlier one.......

jschiwal 11-21-2006 12:22 AM

One way is to boot up and use the kernel option "init=/bin/bash". This will run the root shell right away instead of init. Then use the passwd command and enter the new password.

Another method is to boot up with a rescue disk, mount your root directory and edit out the root password from either /etc/shadow or /etc/passwd. Then use the passwd command to create a new password.

You could have searched this site. This question has been answered many times.

jens 11-21-2006 12:44 AM

You could also just boot in single user mode.
This will boot in root without asking for a password and allows you to change your root password with the passwd command.

In Grub:
Edit the boot command and add "single" at the end of the line.

In LiLo:
Boot your system with "linux single"


All times are GMT -5. The time now is 02:07 AM.