Setting the root password on Ubuntu for the first time

I tried to copy a folder from a remote machine:

acm@acm-docker2:/$ sudo rsync -avz root@ /opt/
The authenticity of host ‘ (’ can’t be established.
ECDSA key fingerprint is 38:0c:ee:74:49:65:7d:74:35:b3:a0:76:13:db:5e:74.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘’ (ECDSA) to the list of known hosts.
root@’s password:
Permission denied, please try again.

..and failed because the root account is locked by default so I have to set a password first:

sudo passwd root

I ran the command again and this time it works.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s