2

I am running an up-to-date installation of Arch Linux and GNOME 3.28. For security reasons I don't allow root login in the consoles. I have done this by configuring /etc/securetty.

However, it worries me that in the GUI I can still login into the root account from the GNOME GDM login screen.

Is there any way to prevent this so that only standard user accounts and administrator accounts can login from the graphical login, but not the root account?

1

This can be achieved as stated here by adding the following line:

auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so

To these files (some may not already exist and have to be created):

/etc/pam.d/gdm
/etc/pam.d/gdm-autologin
/etc/pam.d/gdm-fingerprint
/etc/pam.d/gdm-password
/etc/pam.d/gdm-smartcard 

The person who pointed me to this link said that he preferred me to write the answer instead of him (because he doesn't have a system to test this on and prefers not to write blind answers). But thanks still goes to him (@Kusalananda).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy