How do I change a user password in Ubuntu Linux?

We recently switched from Windows server operating system to Ubuntu Linux operating system at work. I am a developer by profession and do not know much about Linux. I need to change the sftp/ssh user account password on Ubuntu. How do I change a user password in Ubuntu Linux?

Introduction – Your Ubuntu Linux account information stored in a file named /etc/passwd and encrypted password in /etc/shadow. This page explains to you how to change the Ubuntu Linux root and user account password using the passwd command line.

How to change a user password in Ubuntu

  1. Open the terminal application by pressing Ctrl+Alt+T
  2. To change a password for user named tom in Ubuntu, type:
    sudo passwd tom
  3. To change a password for root user on Ubuntu Linux, run:
    sudo passwd root
  4. And to change your own password for Ubuntu, execute:
    passwd

How to change a root (superuser) password in Ubuntu

Firstly, open a terminal window. If you want to change the password for remote Ubuntu server, log in using the ssh command:
ssh [email protected] [email protected]
Type ‘sudo -i’ at the command prompt, and Enter key:
sudo -i
Type the current user password and press Enter key. Finally type NA command and press Enter to change password for root user:
passwd

How to change a root user password in Ubuntu Linux

Change password for root user on Ubuntu

Similarly, you can type the following command on Ubuntu to change the root user password as well:
sudo passwd

How do I change the user account password on Ubuntu?

Again open a terminal window. Type the following command to change the password for regular Ubuntu user account named jerry:
sudo passwd {userNameHere}sudo passwd jerry ## <-- change password for jerry ##sudo passwd vivek ## <-- change password for vivek ##

How to change a user password in Ubuntu Linux

How to change the user Password in Ubuntu Linux

Refer: https://www.cyberciti.biz/faq/change-a-user-password-in-ubuntu-linux-using-passwd/