Friday, May 11, 2012


Allow Root Login Fedora Linux



In Fedora Linux distro, you cannot login by root user by default. Normal users are allowed to login from your Graphical Desktop of Gnome or KDE. But there are certain tasks that have to be done by root. When you are making kernel level changes, Fedora asks for Root user credentials, I mean system asks for root password. But what if you want to login as root, which is not allowed by default to keep your system safe from accidental misconfigurations.

Here are the steps to do that:

[user@fedora16]$ su – root

            <Switch your privilege to root>

[user@fedora16]$ cd /etc/pam.d

[user@fedora16]$ cp gdm gdmorifile.old

[user@fedora16]$ vim gdm

auth required pam_succeed_if.so user != root quiet

            <Find and comment/delete above line>

NOTE: If you are using Fedora 10 or below version, these steps are enough. But if you are 


using Fedora 16 you need to modify one more file.

[user@fedora16]$ cp gdm-password gdm-passwordfile.old

[user@fedora16]$ vim gdm-password

auth required pam_succeed_if.so user != root quiet

            <Find and comment/delete above line>

:wq

            <Now reboot your system and login as root>

Cheers