Link to home
Start Free TrialLog in
Avatar of sambec22
sambec22

asked on

Linux Centos ver 5.6 -- Lost Root Password

Does anyone know how to recover the root password?  The last Admin left the company and will not give us the root password.
Avatar of maeltar
maeltar
Flag of United Kingdom of Great Britain and Northern Ireland image

reboot into single user mode and use the passwd command
on boot, in grub screen, hit "e", and edit kernel command line, add "init=/bin/bash", then boot
after boot, you will automatically enter in root permissions.
ASKER CERTIFIED SOLUTION
Avatar of upanwar
upanwar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If your grub configuration is password protected the mentioned commands to change to grub boot menu might not work.
In that case you an always boot using another boot CD of a Linux-Live-Distribution or Linux-Recovery-CD and then edit /etc/passwd or /etc/shadow by hand.