To enable root account, use the command:

sudo passwd root

This will prompt for a new root password and once confirmed, the root account can be used to login.

To disable root account in Ubuntu,  lock the root account by using the command:

sudo passwd -l root

To work on a root console, use the following command

sudo -i