LinuxHelps.com

A blog for Linux Lovers.

28
Jun 2009
How to Reset a Linux Box root password.
Posted in Linux Administration by sibu at 7:11 am |

If the linux box protected with root password only.

Do a hard reboot on the machine and click on ‘e’ button to edit the boot like when you get the grub menu. Scrol down to the line which starts with kernel and hit ‘e’ again to edit and add ‘single’ (with out quotes) at the end and hit Enter. Now use ‘b’ to boot then you will get single user mode from where you can change the server root password.

If the linux box protected with a password for single user mode.

Few system require root password to boot into ‘single mode’ in that case try to edit the gurb boot line and add ‘init=/bin/bash’ at the end of kernel line. You will be redirected to a bash shell instead of init.

Now you may want to mount the root paritition with read/write permission.

mount –no remount,rw /

Then reset the password.

If the Grub is protected with a root password, then try booting from a LiveCD and open a root shell.  Execute fdisk –l to show the available disk partition. Mount the root paritition to /mnt

mount -o,rw /dev/hda1 /mnt

Make sure that you mount a root partition. Next change this partition as your root directory using following command

chroot /mnt

Now try to change the root password using passwd command.


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses:

Ben T George said:

thanks…nice information


ANTONIO said:


Pillspot.org. Canadian Health&Care.No prescription online pharmacy.Best quality drugs.Special Internet Prices. Low price drugs. Buy pills online

Buy:Buspar.Zocor.Zetia.Seroquel.Cozaar.Aricept.Lipitor.SleepWell.Nymphomax.Advair.Lasix.Ventolin.Amoxicillin.Acomplia.Female Pink Viagra.Benicar.Wellbutrin SR.Lipothin.Prozac.Female Cialis….


Leave a Reply