Wednesday, February 4, 2015

[Ubuntu]: Linux basics: How To Reset Forgotten Password In Ubuntu

Linux basics: How To Reset Forgotten Password In Ubuntu

Here, we will reset the lost/forgotten password of Ubuntu 14.10 server.
Power on the system. You should see the grub menu when booting your system.
Ubuntu 14.10 server [Running] - Oracle VM VirtualBox_007
Press “e” to edit the grub menu. The following screen should appear.
Ubuntu 14.10 server [Running] - Oracle VM VirtualBox_008
Find the line that starts with: linux     /boot/vmlinuz….
Ubuntu 14.10 server [Running] - Oracle VM VirtualBox_009
Go to the end of the line and type: init=/bin/bash
Ubuntu 14.10 server [Running] - Oracle VM VirtualBox_010
Now, press CTRL+X or F10 to boot your Ubuntu system.
Once you reached the bash prompt, type the following commands to mount the file system in rw mode.
mount -o remount,rw /
Now, change the password using command:
passwd
The above command will reset your root user password. If you want to change the password of a specific user, for example sk, use the following command instead.
passwd sk
Reboot your system.
reboot -f
That’s it. Now, you can login using your new password.

No comments: