Linux Server change password – how it works

Want to set a new password for Ubuntu? We’ll show you how.

With the Linux distribution Ubuntu, you can and must set various passwords. Be it the user-specific passwords or the root password that needs to be changed. Both are easy to do. To do this, follow the relevant instructions.

Change root password

  • If you want to change the UNIX/root password (i.e. the administrator password) you need to use this method:
  • Open the terminal by pressing [Ctrl] + [Alt] + [T].
  • Enter sudo passwd root and confirm the entry by pressing the [Enter] key.
  • You will now be asked for your user password. Enter it and confirm with [Enter].
  • Then enter the new root password and confirm again with [Enter].
  • You must then repeat this entry to be on the safe side. Now you have successfully set a new root password for your Linux system.

Buy Linux Advance VPS #1 -> $29.95/mo

Change the password for a user

If you want to change another user’s password, you need root privileges. This means that you are the only user of the computer who has unlimited rights to all system files and resources. So keep your password ready during the procedure.

To change a user password, go to the terminal and type “sudo passwd <username>”.
Now simply follow the steps in the previous example: enter the new password and confirm it by entering it again.
Once the password has been set, the respective user must use the new password the next time they log in.

$ sudo passwd username
Enter a new UNIX password:
Re-enter the new UNIX password:
passwd: Password changed successfully