Mod Warning: Running as root is a bad idea - You never need to do it but if you do you can very easily and irreparably destroy your system and your data.
-------
It is rather simple. Just do a sudo passwd -u root. This will prompt for a new root password and once you confirm it, you can start using the root account to login.
Reverting back:
If you want to disable root account in Ubuntu you need to lock the root account by using the following command sudo passwd -l root
Alternative:
If you want to work on a root console you can also use sudo -i.
Only do this if you know what you are doing. More information on why to stay with sudo here
Graphical version needs setting up 1st:
gksu gnome-terminal will open a terminal with a root prompt.
passwd root will allow you to create a password for root.
Of course you can still format the / partition with sudo. The most common use of sudo, especially in Ubuntu, is to temporarily grant superuser permissions, which allow you to change almost any aspect of the system -- and sometimes formatting the / partition really is the order of the day. My understanding was that the primary reason to disallow direct logins as root -- as opposed to logging in as a regular user and using su to relogin as root -- was that it requires a login by a regular user first, which is logged. Secondarily, it discourages habitual logins as root, which is a sloppy habit. – bgvaughanMay 22 '11 at 15:25