Ubuntu: Change your password using the command line

Ubuntu logoHow do you change your password in Ubuntu? Well, using the command line, it’s actually quite easy…

I’m going through a process of changing my various computer and web passwords. After the much publicised vulnerabilities with Google and MSN a few weeks ago, I thought it might be a good time to change my passwords.

Now, to change your password through the command line, you simply type in passwd and hit return. You’ll be prompted to enter your current password first, then your new password twice. It’s that easy.

A GUI Password Change?

I decided to do a little digging around to see if there was a GUI option to change your password. After all, how much use if Ubuntu for regular users if they can’t accomplish basic security tasks?

Surprisingly, the GUI to change password can be found in System -> Preferences -> About Me. When you bring up this dialog, there’s a Change Password button in the right hand corner. Follow the prompts and you’ll achieve exactly the same thing as if you’d used the command line.

5 thoughts on “Ubuntu: Change your password using the command line

  1. Anonymous

    The above advice would be usefull if A). The GUI password change applet functioned correctly (9.10, 10.04).  Or B). It wasn’t the second search result for “Comand Line Password Reset”…and then procede to explain the GUI method.  So if you wound up here like I did…and actually want to know how to change your password from the command line here you go;$ passwdChanging password for “current username”(current) UNIX password: “enter current password here”Enter new UNIX password: “enter new password”Retype new UNIX password: “reenter new password“passwd: password updated successfully

    1. gerard

      I thank the anonymous commenter for his/her comment, but a more careful reading of the post would reveal the command line covered in the third paragraph.The command itself isn’t covered in much detail because it’s so simple. The GUI option is something I’d just discovered at the time of writing this, and you need a little extra help to get to that interface.

      1. Grant Black

        With all due respect These instructions don’t work on 12.10. There is NO preferences tab in system.

  2. Transformer

    u can change a user password in your terminal…
    first become a root user “su -l”
    then you can now request for a new password
    by “passwd username”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s