> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Change User Password in Ubuntu
- URL: https://itsfoss.com/change-password-ubuntu/
- Published: 2019-02-17T05:23:58.000Z
- Updated: 2023-06-01T10:02:35.000Z
- Description: Want to change root password in Ubuntu? Learn to change the password for any user in Ubuntu Linux using both terminal and GUI methods.
- Author: Abhishek Prakash
- Tags: Ubuntu

Why do you need to change the password in Ubuntu? Let me give you a couple of scenarios.

When you [install Ubuntu](https://itsfoss.com/install-ubuntu/), you create a user and set a password. It could be a weak password or a bit too complicated, and you want to change it.

If you are a sysadmin, you may need to change the password for other users on your system.

You may have a few other reasons for doing this. Now the question comes, how to change the password for a user in Ubuntu or Linux?

In this quick tutorial, I’ll show you the following:

- Change user password via the command line
- Change root user password
- Change user password via GUI

## Change user password in Ubuntu \[Command Line\]

Changing user password in Ubuntu is dead simple. In fact, it’s the same with any Linux distribution because you use the generic Linux command called `passwd` for this purpose.

If you want to change your current password, simply run this command in a terminal:

```
passwd
```

You’ll be asked to enter your *current password* and the *new password* twice.

✋

You won’t see anything on the screen while typing the password. This is perfectly normal behavior for UNIX and Linux.

![Change password of the current user using "passwd" command](https://itsfoss.com/content/images/2023/05/change-user-password-final.svg)

Change Password using `passwd`

Since this is your admin account, you just changed the sudo password in Ubuntu without even realizing it.

📋

Sometimes, the `passwd` command will throw errors like:  
**Small Password:** If the new password is shorter than 8 characters  
**Fails Dictionary Check:** Does not contain enough different characters. So, use some other characters than just numbers and try again.

If you want to change the password for some other user, you can do that as well with the `passwd` command. But in this case, you’ll have to use sudo.

```
sudo passwd <user_name>
```

![Change the password of another user in Ubuntu terminal](https://itsfoss.com/content/images/2023/05/change-another-user-password.svg)

Change another user password

If you changed your password and forgot it later, don’t worry. You can [easily reset Ubuntu password](https://itsfoss.com/how-to-hack-ubuntu-password/).

[How to Reset Forgotten Ubuntu Password in 2 MinutesIf you forgot your user password on Ubuntu, don’t worry. You can reset an Ubuntu password very easily. This guide explains an easy method for changing the root password on Ubuntu. The method should also be applicable to other Linux distributions.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2012/07/reset-ubuntu-password.png)](https://itsfoss.com/how-to-hack-ubuntu-password/)

## Change (or set) the root password in Ubuntu

By default, the [root user in Ubuntu](https://itsfoss.com/root-user-ubuntu/) doesn’t have a password for the desktop editions.

Don’t be surprised. You don’t use the root user in Ubuntu all the time. Confused? Let me explain it to you quickly.

While [installing Ubuntu](https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/), you are 'forced' to create a user. This user has admin access. This admin user can gain root access using the sudo command. But it uses its own password, not the root account’s password (because there is none).

You can set or change root password [using the ****passwd*** command](https://linuxhandbook.com/passwd-command/?ref=itsfoss.com). However, in most cases, you don’t need it and you shouldn’t be doing it.

***Now, about changing the root password.***

You’ll have to use sudo (with an account with admin privileges). If the root password was not set up previously, it would ask you to set it up. 

Else, you can change it using the existing root password.

```
sudo passwd root
```

![Change root password using "passwd" command](https://itsfoss.com/content/images/2023/05/change-root-passwd.svg)

Change Root Password

I also suggest learning more about the root user concept in Ubuntu. 

[Root User in Ubuntu- Important Things You Should KnowHow do you become root user in Ubuntu? Either you run commands with root privilege like this: sudo any\_command Or you switch user in Ubuntu to root user like this: sudo su In both cases, you’ll have to enter your own user account’s password. But there’s![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2020/01/root_user_ubuntu.png)](https://itsfoss.com/root-user-ubuntu/)

## Change Ubuntu password using GUI

I have used GNOME desktop with Ubuntu 22.04 here. The steps should be more or less the same for other desktop environments and Ubuntu versions.

Go to Overview (press Windows/Super key) and search for Settings.

In Settings, scroll down a bit and go to **Users**. Here, you can access all the available users on your system.

You need to unlock the users first, using the currently logged-in user password

![Go to Users in Ubuntu GNOME settings and Unlock the section using the current logged in user password](https://itsfoss.com/content/images/2023/05/unlock-users-section.png)

Select Users and Unlock it

You can select any user you want, including your main admin account. Click on the password field.

![Changing user password in Ubuntu](https://itsfoss.com/content/images/2023/05/change-password.png)

Change Password of the User

Now, select **Set password Now** option on the dialog box and type and confirm the new password. If you are changing your own password, you’ll also have to enter your current password.

![Changing the current user password in Ubuntu needs to type the existing password also](https://itsfoss.com/content/images/2023/05/enter-current-password-also-1.png)

Enter Current user password also

Once done, click on the Change button on the top. That’s it. You have successfully changed user password in Ubuntu.

Don't forget that if you have forgotten your admin account password, you should be able to easily reset it.

[How to Reset Forgotten Ubuntu Password in 2 MinutesIf you forgot your user password on Ubuntu, don’t worry. You can reset an Ubuntu password very easily. This guide explains an easy method for changing the root password on Ubuntu. The method should also be applicable to other Linux distributions.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2012/07/reset-ubuntu-password.png)](https://itsfoss.com/how-to-hack-ubuntu-password/)

## More on user passwords in Linux

The passwd command does a lot of work related to user passwords in Linux. Learn more on it. 

[Passwd command in Linux: 8 Practical ExamplesThe passwd command in Linux allows you to change user password, lock accounts, expire passwords and more. Learn how to use the passwd command with practical examples.![](https://linuxhandbook.com/content/images/size/w256h256/2021/08/Linux-Handbook-New-Logo.png)Linux HandbookChristopher Murray![](https://linuxhandbook.com/content/images/2020/06/passwd-command-2.jpg)](https://linuxhandbook.com/passwd-command/?ref=itsfoss.com)

Here's a fun thing you can do with sudo so that it [makes fun of you when you enter incorrect password](https://itsfoss.com/sudo-insult-linux/).

[Make Sudo Insult User For Each Incorrect Password AttemptHave fun with sudo. Tweak sudo settings a bit so that it throws insults at users for each incorrect password attempt.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/2023/02/make-sudo-insult-users.png)](https://itsfoss.com/sudo-insult-linux/)

And get familiar with the Seahorse password manager app in Linux desktops.

[Seahorse: Manage Your Passwords & Encryption Keys in LinuxBrief: A simple open-source password and encryption key manager app, let’s explore what it has to offer and how you can get it installed. We often tend to ignore many default/pre-installed applications, especially when numerous tools and utilities are baked in. One such helpful tool that y…![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAnkush Das![](https://itsfoss.com/content/images/wordpress/2021/10/Seahorse-ft.png)](https://itsfoss.com/seahorse/)

I hope this tutorial helped you change user password in Ubuntu. If you have questions or suggestions, please leave a comment below.