Rony Bill wrote:
Arun K. Khan wrote:
On Fri, 2005-09-09 at 10:22 +0530, Rohit Baisakhiya wrote:
I forget the root password.How to recover the root password?
- Boot off of a rescue CD
- mount the / partition to /mnt
- edit /mnt/etc/shadow
- zap the password field (see man 5 shadow)
- Upon reboot: login and change the password
Instead boot in single user mode and change the password to what ever you want.
It is distro dependent -
SuSE 9.3 - need root password to boot into runlevel 1 FC 4 - !need root password to boot into runlevel 1 (I guess the same for derivatives of Fedora/Redhat)
For distros that need root passwd for runlevel 1, the CD is required. However if the root operator has forgotten his existing password, it will be necessary in *both* bootup cases to delete the password entry either in /etc/shadow as mentioned by Arun or delete the second field entry 'x' in the /etc/passwd on the line corresponding to the root user. Then set a new password.
A CD is not all required, just append the parameter init=/bin/bash to the kernel line in grub.conf, it works in suse as well.
mifthas haris