Ubuntu Linux: Change Root & Current User Password

Change current logged in user’s password

Go to Applications -> Accessories -> Terminal, then run the command below:-

passwd

Then, enter the current and new password and you are done.

Change root password

Go to Applications -> Accessories -> Terminal, then run the command below:-

sudo passwd root

Type the following command to unlock the root or administration account.

sudo passwd -u root

You are done. Switch to ‘root’ account with the following command:-

su root

Then enter the newly changed root password.

Hope this helps. Thanks.