By default, the root user is prohibited from logging on to Ubuntu. You need to modify the settings.
The first step is to set the password sudo passwd root for the root user.
Step 2: Click system-> preferences-> login window menu, and switch to security
Select the "Allow local system administrator login" option.
System> System Management> logon window, click the "Security" option page and select "Allow Local Administrator Logon ".
Other methods:
==========================================================
In gnome, Open System --> administration --> login screen setup, and click
Security Page, select allow root login
==========================================================
Sudo VI/etc/TPD. conf
Open the gnome configuration file, find allowroot = false, change false to true, save and exit. After the system is restarted, you can log on with the root user.
==========================================================
Open Konqueror in KDE and open the/etc/kde3/KDM/directory. Right-click the kdmrc file and choose --> 'edit
As root', change allowrootlogin = false to 'true' on Row 246, and save