If Ubuntu server is installed anew, users tend to have a dilemma as to the steps involved in gaining access to the root account.
Root account exists but the password is not empty though.
The user should log in with the account he/she creates during the installation process.
From the user account, go to the shell
$ sudo sh
Then change the password from the shell,
$ sudo passwd
Password:
Enter new UNIX password:
Retype new UNIX password:
Now you can login with root privileges with new password that is set