Recently I have been experimenting on a Fedora development server. I had a need to login to the GUI as root and found that my credentials always produced “Authentication Failure”. After reading around for some time, as far as I understand, after Fedora 10 the development team has, by default, disallowed logging into the GUI as root. While I won’t go into the annoyance that such a strange limitation has caused, here’s how to reclaim GUI root login abilities.

If you already have a non-root user account with which you can use a GUI, follow Cyberciti’s instructions.

If you were like me and did not create a user profile when installing Fedora (I’m toying around on my dev server and have no need for protection from root or a need of another user account), you won’t be able to login to open a terminal. Fortunately, you can open a terminal at the login screen.

Press Ctrl+Alt+F2 to switch to a terminal. Here you can login (the only choice, if you find yourself needing to use this method, is to login as root — root is dangerous; you can break everything and not be warned about any of it, so use at your own risk). Now from here, you have two options.

Method 1:
Create a new user. I consider this the safer option since you can then login to the new user’s account and work with the necessary configuration files in a GUI. To create a new user, use this template (while logged in as root):

useradd [-p password] name

Replace “name” with the username of the new user, and the -p parameter specifies that the following string is the user’s password.From here, exit the terminal by pressing “Alt+F1”, login to the new user’s account, and proceed with Cyberciti’s instructions above.

Method 2:
This method is for the command-line savvy. Enter the terminal from the GUI login screen and login as root. Use the vi editor to edit the necessary files mentioned in Cyberciti’s instructions. Here are great usage instructions for the vi editor. Of course, first backup each file that will be tampered with in the event that something goes wrong.Opening the first configuration file in the vi editor can be accomplished with:

vi /etc/pam.d/gdm

After either method, it may be necessary to restart your computer before the changes appear to take effect.