In this quick tutorial we will learn how to change Linux user password using command line. First we need to connect to the server using ssh.
For SSH access one can use either build-in Linux, iOS and Windows terminal or standalone terminal like Putty client [download]. We are using Ubuntu Linux, so we will use build-in terminal.

ssh username@hostname or IP address
In order to change a user password you can use the command below:
passwd USER
Change USER for the actual username you are updating the password for. In our case, we will update password for the user ubuntu. Please, keep in mind the password strength and do not use weak password.

You will be required to enter current password first, then new password and new password confirmation to make sure you entered the desired password.
Once password has been updated, you will see message: password updated successfully
No Comments
Leave a comment Cancel