≡ Menu

How To Change Password On Ubuntu

Question: How do I change password for my account and other user accounts on Ubuntu Linux OS?

Answer: On Ubuntu, you can change password from either GUI or command line as explained below.

1. Ubuntu Change Password from GUI

Launch Change Password Window by clicking on “System -> Preferences -> About Me”, which will display the following window. Click on ‘Change Password’ button in this window.

Ubuntu Change Password - About Me Window

Enter Current Password: In the change password window, enter your current password and click on ‘Authenticate’.

Ubuntu Change Password - Enter Current Password

Enter New Password: Once you enter the current password, the new password text field will be enabled. Enter your new password and click on ‘Change Password’.

Ubuntu Change Password - Enter New Password

2. Ubuntu Change Password from Command Line

Change your account password using the passwd command as shown below. Following example changes the password of the current logged-in user.

ramesh@ramesh-desktop:~$ passwd
Changing password for ramesh.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

If you want to change password for another Ubuntu user, use the following method. Following example changes the password of user jsmith, from user ramesh.

ramesh@ramesh-desktop:~$ sudo passwd jsmith
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • Damodar May 5, 2010, 5:00 pm

    Thanks a lot buddy!!

  • Rafael Padilha September 29, 2010, 6:59 am

    You also can change root’s password by command line using $sudo passwd
    first put your password then the new root password

  • samrat October 22, 2010, 1:23 am

    thanks ramesh ,its so helpful for me

  • karan May 30, 2011, 10:28 pm

    hi,

    In the window where ” Enter Current Password: In the change password window, enter your current password and click on ‘Authenticate’.”
    In case of changing the LAN password or sync with LDAP
    Even if you enter anything in the current password field that still authenticates…
    But the new password is not updated…
    Any suggestions?

    Karan

  • Shahnawaz Uqaili June 25, 2011, 12:53 am

    Hello,

    If you have forgotten the root password and you want to reset it. You can do it from “Recovery Mode”. This option appears on the time of boot, after selecting recovery mode. After you select recovery mode and wait for all the boot-up processes to finish, you’ll be presented with a few options. Press arrow key down to select “Drop to root shell prompt”

    Once you’re at the root shell prompt, if you have forgotten your username as well, type

    ls /home
    => You should then see a list of the users on your Ubuntu installation. In this case, I’m going to reset Shahnawaz Uqaili’s password.

    passwd shahnawaz
    => You’ll then be prompted for a new password, then retype new password.

    => Now the password should be reset. Type
    exit

    After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

    Thanks

  • Todd November 4, 2011, 9:13 pm

    Hi – I am using 2 dual boot Ubuntu / Windows machines and to simplify the log on process for my young kids, I have a very short password.

    I would like to do this on my HTPC too, again Ubuntu, so simplify logging in .

    If I use any of the above methods, it states my password is too short. Is there a way around this.

    I have also tried setting auto log on however it will not work?

    Thanks

  • suhaib November 24, 2011, 2:27 pm

    Hey!
    how do I set a password for my login.I already have a password for my account, but it does not ask for the password when the system starts.It directly logs in.Please help.Thank you!

  • mr.RJ March 15, 2012, 9:47 pm

    i can’t the password.why?

  • Rafael padilha March 16, 2012, 5:41 am

    if you dont have de user (and root) password you need do chroot process with A Ubuntu live CD (or other linux live).
    there is a explain (in portugues) how you can do this
    http://www.delete.com.br/recuperar-senha-root/

  • kinfe June 14, 2012, 6:48 am

    This is very helpfull.
    Thank you.

  • Robert July 2, 2012, 11:25 pm

    Thank you. very useful.

  • Naved September 8, 2012, 10:23 pm

    Thanks a lot buddy..

  • Raghu January 5, 2013, 6:46 am

    It worked. Thanks…

  • Jaipal March 6, 2013, 7:32 am

    Thanks buddy , Good one it worked well !!!

  • A T April 28, 2013, 5:01 am

    Brother, many many thanks. May you long live

  • Raj September 14, 2013, 3:33 am

    nice article

  • Rai October 14, 2013, 12:12 pm

    Thanks very much for your time.

  • marie November 6, 2013, 8:04 pm

    I cannot change our password by clicking on to our old password and then authenicate. I am currently using Ubuntu Linex.
    How is this done.?

    Please advise.

    Many thanks,
    Marie

  • Anthony Scaife January 7, 2014, 11:52 am

    Thanks. A simple and effective post.
    I had put my password into a dodgy dialogue in Ubuntu, so to be safe changed it using the command line.

  • TeKola March 27, 2014, 9:57 am

    I am using latest Ubuntu. I cannot find “System”. Instead went to System Settings , Users, selected User and clicked on password.
    There are too many flavors of Ubuntu out there.

  • Christopher Nicholais May 23, 2014, 9:18 pm

    When I go to recovery mode and drop out to root she’ll prompt it prompts me for a root password. I don’t remember the root password or the used password. How can I reset? Oh why couldn’t they put a forgot password option in the GUI for the user or the root account :0(

  • Tiggr May 28, 2014, 12:41 am

    Thanks! On Ubuntu 13.10 I can’t find where in the system I could change the password, but the “terminal” way always works great, so I changed it via terminal:)))

  • Anonymous September 30, 2015, 1:22 am

    if i forgot the password root but i remember the password user can i reset password by simple user?

  • Marc June 25, 2016, 1:18 am

    very clear explained.