The root Account in Ubuntu is disabled by default because its password is not set.
To use root priviledges, basically it's better to use the sudo command with administrative accounts.
But if you'd like to use root Account itself by some reason, it's possible to use like follows.
sudo -i
Enter your password, and you will switch into privileged mode.
The user account added during installation is setup as an administrative account with sudo.
You can switch to root account's shell:
sudo -s
Enter your password, and you will switch into privileged mode.
ALERT: This is NOT recommended.
sudo passwd root
ALERT: This is NOT recommended.
su -
It is recommended to restrict which users can su to root.
sudo vi /etc/pam.d/su
Edit #line 15: Uncomment and add a group which is allowed to run the su command
...
auth required pam_wheel.so group=adm
...
NOTE: The pam_wheel PAM module is used to enforce the so-called wheel group.
By default it permits root access to the system if the applicant user is a member of the wheel group.
Add users to this group, who are allowed to issue the su command.
usermod -G adm john