Thursday, December 18, 2014

Reset root password in Ubuntu

If for any reason(s) you forgot your Ubuntu root password, then you have a chance to reset the password without causing any issues. This may be a concern to some of us why its been made possible to reset Ubuntu root password but if we are to think outside the box, this could only happen if your machine is not secured physically hence someone is able to do this.
Lets not forget that the best form of securing your system is encrypting the hard drive, that way no one can steal my information. The idea of removing the drive and slaving it elsewhere is defeated since the encrypted drive will not be accessible.
Only do this if its necessary and if you know what you are doing
Reset Root Password
- Boot up your Ubuntu machine, and after the BIOS screen, press ESC key. On the GNU GRUB menu, select *Advanced options for Ubuntu
recovery-pswd-01
- On next screen, select select appropriate recovery mode and press Enter
recovery-pswd-02
- On recovery menu, select ‘root – Drop to root shell prompt’
recovery-pswd-03
- From the prompt menu, you need to remount the filesystem to have write permission
mount -rw -o remount /
- Now check the user available
ls /home/
- Now reset the user password. In my case, its sysadmin
passwd sysadmin
recovery-pswd-04
- When done, exit and resume boot

Courtsey : http://tanglesolutions.com

No comments: