How do you change the root password on Debian?

Ah, use the passwd program as root:

sudo passwd root

Or, if you’re running as root already (which you shouldn’t be), just:

passwd

The root argument can be omitted, because when you execute passwd it defaults to the current user (which is root, as only root can change the root password).


If you're going to be doing a lot of command-line administration, you might find it useful to check out the man pages for usermod(8), chfn(1), chsh(1), passwd(1), crypt(3), gpasswd(8), groupadd(8),