Skip to content

Changing your root password on a Debian server

You can change your root password on your Debian server via SSH with some simple commands by completing the following steps.

See also: Changing your root password on Plesk and cPanel.

Step 1

First of all, log in to the server via SSH.

Step 2

When logged in, if you’re using the root user you just need to type:

sudo passwd root
root@DebianServer:~# sudo passwd root
New password:
Retype new password:
passwd: password updated successfully
root@DebianServer:~# 

Step 3

If you already have root permissions, you will not need to type ‘sudo’. You can also change the ‘root’ to be a different user if you’ve set one up. If you type ‘passwd’ alone, it will change the password for your current user. Here’s an example of a root user changing their own password with a shorter command:

root@DebianServer:~# passwd
New password:
Retype new password:
passwd: password updated successfully
root@DebianServer:~# 

Was this article helpful?

Related guides