Archive

Archive for December, 2011

CentOS in Single user mode / root password reset [Default Installation]

December 15, 2011 Leave a comment

Setting ‘root’ Password for Centos.
Today my friend was having an issue where he was not able to set ‘root’ password.
As the default installation had a default account without “sudo” privilege.
To set the “root” password for Cent OS  Follow below steps.
1. In the grub boot menu prompt – enter “e” (for edit) to edit boot parameters.
2. Select menu this will bring up 3 or more based on the installation type. root, kernel, initrd

 root (hd0,0)
 kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
 initrd /initrd-2.6.8-1.523.img

3. Select “kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00 rhgb quiet” and press “e” for edit

kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00 rhgb quiet single

4. Now add “single” at the end of the line (<space> single) as you see like the above line and press <enter>
5. Now at the boot menu enter “b” for boot
6. This will bring the system up in single user mode.
7. Enter “passwd root” >> Change your root password.
Enjoy!!

Categories: How To