How To Change Password In Ubuntu 12.04 LTS

How To Change Password In Ubuntu 12.04 LTS

Hi linux geeks,

In this tutorial I will teach you how to change the password in Ubuntu 12.04 from the terminal and from the gui. I prefer to change my password from the command line but since there are many people  that prefer the gui I am sharing both methods with you guys in  this article.

What do we need now?

We need a terminal, so press CTRL+ALT+T    in your keyboard and when the terminal comes up enter the following command in order to change the password.

passwd oltjano

Ubuntu will ask for the current password. Type it and hit Enter.

Changing password for oltjano.
(current) UNIX password:

Then type the new password.

Enter new UNIX password:

Retype the new password.

Retype new UNIX password:

If the update is done right you will get the following notification.

passwd: password updated successfully

Now lets do the same thing, but in a different way. Lets change the password from the gui.

Go to Applications, System Tools, System Settings.

Under System go to User Accounts.


Make sure to unlock the account for which you want to change the password.

Then click on   Password.

Type the current password, the new one and then hit Change.

Thats it. I hope this tutorial helps you guys.

Please share it with others.

  • async2013

    thanks. could you do a report on how to recover a lost password?

  • António Miguel Trindade

    Say what?! “sudo passwd” to change the user password? That command changes the root password, not the user’s password… To change the user’s password one simply writes “passwd” in the terminal.

  • Ambition

    The root is a user too. I have explained the command which is passwd. In the example of this tutorial I changed the password of my account in my Ubuntu 12.04 LTS machine.

  • Ambition

    You are welcome. I will see what I can do about that.

  • Chris Jones

    Sorry Ambition. António Miguel Trindade
    is right. You do not need “sudo” to change the password from console.
    Just type “passwd” and then enter the new password. That is all that is

    This article is misleading for new users and should really be corrected.

  • António Miguel Trindade

    Chris Jones is right. By changing the password in the console with “sudo passwd” you are changing the root user’s password and not your own.

    However, you can change the root password, if you want to be able to login as root. Anyway, direct root login is only recommended if allowed locally.

    Even so, in Ubuntu, you do not need the root password to administer the system.

  • SK

    Yes, you’re right. Article is updated now. Thanks for the heads up.

  • Ambition

    We updated the article. Refresh the site :)

    I dont’ know what kind of ubuntu you are using but mine doesnt allow me to install packages if I don’t have root permissions.

  • Chris Jones

    Dude, I think you’re confused. Your own article is about changing the
    Linux password. It has nothing to do with installed software, nor does
    your article mention installing software.

    Or, you’re not understanding how “sudo” works.

  • Ambition

    “Even so, in Ubuntu, you do not need the root password to administer the system”, thats what your friend said. Did I mention administer in my article???