Often to users the question arises - how to change password in Ubuntu? This can be done in two ways - from the GUI or the command line.

To change the password via the GUI


To do this, you must click on the button System -> Settings -> About himself, then opens the corresponding window. Then on the tab "Change password".
In the window change password enter your current password and click "Authenticate". Then include a text field for entering new data. Enter a new password and click on the "Change password".

To change the password from the command line


Change the password of an account with the PASSWD command. This can be done according to the example shown below.
At the prompt, enter the following:
ramesh@ramesh-desktop:~$ passwd
Then enter your current password and twice the new one. If you did everything correctly, you should see the following entry:
passwd: password updated successfully
If you want to change the password of another user Ubuntu, command should be changed slightly. For example, for user JSmith it will look like this:
ramesh@ramesh-desktop:~$ sudo passwd jsmith
This is followed twice to write a new password and wait for such a response system:
passwd: password updated successfully

To recover the password in Ubuntu


Also don't worry if you forget your password and cannot log in Ubuntu on your computer. There is a very simple and quick way to reset the password using recovery mode in the Grub menu. Follow these steps to change your password:
Then start the computer. In the Grub menu, which appears by default when you start the computer, select "options jobs Ubuntu". In the window that appears click on the tab "Ubuntu, with Linux 3.11.0-13 generic (recovery mode)".
In the drop-down menu, select "Root – Drop to root shell prompt". Now command prompt will appear at the bottom of the screen. You should display all users on the computer by typing the command ls /home. Then enter the following: mount-rw-o remount /, then type your username.
For example, if your username is ABC, the command line should look like the following:
passwd abc
Then enter the new password twice. If done correctly, you will receive a system response that password was updated successfully. Now you can simply restart your computer and log into Ubuntu with the new password.