October 17, 2016

Remove CentOS 7 Login User List

Some for security reasons. Others due to using remote login servers and some because they just cannot abide user lists on login screens, prefer to remove them and drop to a layout that requires users to enter both their username and password to login.

Screen 01:

CentOS 7 default login screen using user list.


To remove the user list. We must do the following.

Open a terminal and enter the command line below and press ENTER on the keyboard.

sudo vim /etc/dconf/profile/gdm

Once open, insert the text below.

user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults


Once done. Save and exit the file.

Still in the terminal. Enter the command line below and press ENTER on the keyboard.

sudo vim /etc/dconf/db/gdm.d/00-login-screen

Once open, insert the text below.

[org/gnome/login-screen]
# Do not show the user list
disable-user-list=true


Once done. Save and exit the file.

Now we have added the necessary files, we must update dconf.

Still in the terminal. Enter the command line below and press ENTER on the keyboard.

sudo dconf update

Finally we need to reboot.

Still in the terminal. Enter the command line below and press ENTER on the keyboard.

sudo reboot

Screen 02:

Login screen without the user list.


No comments:

Post a Comment