Sign in or 

|
CMG347 |
Changing root password using GRUB
Jul 5 2009, 9:02 AM EDT
If you have forgotten yhe root password of your Linux system, there is no need to panic! The fix is quite simple. Reboot your system. At the GRUB graphical menu, pres E to edit and add the following parameters to the kernel argument:kernal /boot/vmlinux-2.6.2*-*-generic root=/dev/sda5 rw init=/bin/bash Replacing 2.6.2*-* with your actual kernel version. Type uname -r to find your kernel version. I.E. 2.6.28-11-generic Here, byy appending the init=/bin/bash argument to the kernal line, we are telling linux to immediately enter a bash prompt after booting the kernel. You can now reset the root password using the passwd command, as follows. bash # passwd Now you may wonder that if it's so simple to reset the root password, then ordinary users can take advantage. But you can restrict it by using a password for the GRUB loader, so that unauthorized users can't reset the passwords. 1 out of 1 found this valuable. Do you? |