Lot of people are confusing with root password in Ubuntu linux. It is not need for ordinary users, they can just use ''sudo'' and "gksudo" that is more than enough. But some power users need to login as "root" user. Now you must setup a password for "root".
Open up a terminal and type sudo passwd root
Now it ask for the root password . You can set it. You can login as root in terminals now.
But ubuntu will not allow you to login as root in X-session (Graphics). If you want to login as root in X-session Do the following
Select System--> Administration-->Login Window
then Select Security tab
Tick Mark the Allow local system administrator login