In Ubuntu, the mechanism that prevents the user from logging in as root is the login manager. By default, Ubuntu uses GDM by default, so the instructions will be different under Xubuntu and Kubuntu, or if you have changed your Display Manager/Login Manager. To configure GDM to allow root login, the /etc/gdm/gdm.conf-custom file needs to be modified. The reason you modify this file instead of the /etc/gdm/gdm.conf file is the the latter can be changed during an update, and in later versions of GDM, the gdm.conf-custom file has been provided for user overrides of settings. Any changes in the /etc/gdm/gdm.conf-custom file will take precedence. Under the [security] section, add the following entry:
Thats all there is to it. This will only allow root logins from the local terminal. If you are using a remote X session, you will still not be able to login as root unless you override the AllowRemoteRoot setting. Fortunately, depending on your point of view, Linux does not use anything to neuter the root account.