How To Change Password On Ubuntu

by Ramesh Natarajan on December 25, 2009

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

Linux Sysadmin Course Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

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

{ 22 comments… read them below or add one }

1 Damodar May 5, 2010 at 5:00 pm

Thanks a lot buddy!!

2 Rafael Padilha September 29, 2010 at 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

3 samrat October 22, 2010 at 1:23 am

thanks ramesh ,its so helpful for me

4 karan May 30, 2011 at 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

5 Shahnawaz Uqaili June 25, 2011 at 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

6 Todd November 4, 2011 at 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

7 suhaib November 24, 2011 at 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!

8 mr.RJ March 15, 2012 at 9:47 pm

i can’t the password.why?

9 Rafael padilha March 16, 2012 at 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/

10 kinfe June 14, 2012 at 6:48 am

This is very helpfull.
Thank you.

11 Robert July 2, 2012 at 11:25 pm

Thank you. very useful.

12 Naved September 8, 2012 at 10:23 pm

Thanks a lot buddy..

13 Raghu January 5, 2013 at 6:46 am

It worked. Thanks…

14 Jaipal March 6, 2013 at 7:32 am

Thanks buddy , Good one it worked well !!!

15 A T April 28, 2013 at 5:01 am

Brother, many many thanks. May you long live

16 Raj September 14, 2013 at 3:33 am

nice article

17 Rai October 14, 2013 at 12:12 pm

Thanks very much for your time.

18 marie November 6, 2013 at 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

19 Anthony Scaife January 7, 2014 at 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.

20 TeKola March 27, 2014 at 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.

21 Christopher Nicholais May 23, 2014 at 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(

22 Tiggr May 28, 2014 at 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:)))

Leave a Comment

Previous post:

Next post: