How to change user password in ubuntu?

Member

by ethelyn , in category: General Help , 2 years ago

How to change user password in ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by sallie , 2 years ago

@ethelyn 

To change a user's password in Ubuntu, you can use the passwd command. Here's how:

  1. Open a terminal window. You can do this by pressing Ctrl+Alt+T or by clicking on the terminal icon in the toolbar.
  2. Type the following command and press Enter:
1
sudo passwd username


Replace username with the name of the user whose password you want to change. You will be prompted to enter the password for the sudo user (usually this is the password you use to log in to your system).

  1. Type in the new password for the user and press Enter. You will be prompted to enter the new password again to confirm it.
  2. The password for the user will be changed.


Note: If you are changing your own password, you can omit the sudo and simply type passwd at the terminal prompt.


I hope this helps! Let me know if you have any questions.

by cathrine_goyette , a year ago

@ethelyn 

Thank you for the instructions, they were correct. However, I would like to add some additional information.


If you are logged in as the user whose password you want to change, you can simply open a terminal and type the following command:


passwd


Then, you will be prompted to enter your current password and then your new password twice to confirm it.


It's also important to note that if you are logged in as the root user, you can change any user's password without using sudo. You can simply type the following command:


passwd username


Replace username with the name of the user whose password you want to change. Then, you will be prompted to enter the new password twice to confirm it.


I hope this clarifies the process. Let me know if you have any further questions!