LightDM: How To Disable The User List Or Guest Session
1. To disable the LightDM login screen user list and / or Guest Session, firstly create the /etc/lightdm/lightdm.conf.d/ folder in case it doesn't exist, by using the following command:
2. Next, you need to create a file called 50-my-custom-config.conf under /etc/lightdm/lightdm.conf.d/ To open/create this file using Gedit (as root), use the following command:
3.a. To hide the LightDM login screen user list (which means you'll have to manually enter your username), paste the following in this file (50-my-custom-config.conf):
Here's how LightDM (with Unity Greeter) will look after this change:
=========================================
For UBUNTU 14.04 and above
The file to edit is now located in
I just added the line:
and on next reboot I was able to input any user name on the login screen.
OR
The solution is to create a file
After a system reboot, I was able to login with other users.
==============================================
3.b. To disable the LightDM Guest Session, paste the following lines in the /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf file:
Here's a screenshot with the Guest Session disabled in LightDM (with Unity Greeter):
3.c. Of course, you can combine the two. So if you want to hide the LightDM login screen user list and also disable the Guest Session, paste this in the /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf file:
Here's a screenshot with LightDM (Unity Greeter) in which the user list was hidden and the Guest Session was disabled:
4. And finally, you need to restart LightDM (a logout is not enough). To do this, press ALT + F2 and copy/paste the following command:
You can also simply restart your system.
Then, restart LightDM as explained under step 4 or reboot your computer.
Quick tips for Ubuntu / LightDM
users: if you want to hide the LightDM login screen user list and / or
the Guest Session for security concerns, because there are too many
users or whatever other reason, here's how to do it.
Default LightDM login screen (Unity Greeter) with user list and Guest Session enabled |
1. To disable the LightDM login screen user list and / or Guest Session, firstly create the /etc/lightdm/lightdm.conf.d/ folder in case it doesn't exist, by using the following command:
sudo mkdir -p /etc/lightdm/lightdm.conf.d
2. Next, you need to create a file called 50-my-custom-config.conf under /etc/lightdm/lightdm.conf.d/ To open/create this file using Gedit (as root), use the following command:
gksu gedit /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf
3.a. To hide the LightDM login screen user list (which means you'll have to manually enter your username), paste the following in this file (50-my-custom-config.conf):
[SeatDefaults]
greeter-hide-users=true
greeter-show-manual-login=true
Then save the file.Here's how LightDM (with Unity Greeter) will look after this change:
=========================================
For UBUNTU 14.04 and above
The file to edit is now located in
/usr/share/lightdm/lightdm.conf.d
, and is called: 50-ubuntu.conf
.
I just added the line:
greeter-show-manual-login=true
and on next reboot I was able to input any user name on the login screen.
OR
The solution is to create a file
lightdm.conf
inside /etc/lightdm/
and put the following contents in it:
[SeatDefaults]
greeter-show-manual-login=true
After a system reboot, I was able to login with other users.
==============================================
3.b. To disable the LightDM Guest Session, paste the following lines in the /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf file:
[SeatDefaults]
allow-guest=false
Then save the file. Here's a screenshot with the Guest Session disabled in LightDM (with Unity Greeter):
3.c. Of course, you can combine the two. So if you want to hide the LightDM login screen user list and also disable the Guest Session, paste this in the /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf file:
[SeatDefaults]
greeter-hide-users=true
greeter-show-manual-login=true
allow-guest=false
Then save the file. Here's a screenshot with LightDM (Unity Greeter) in which the user list was hidden and the Guest Session was disabled:
4. And finally, you need to restart LightDM (a logout is not enough). To do this, press ALT + F2 and copy/paste the following command:
gksu service lightdm restart
Then press ENTER.You can also simply restart your system.
Why not use "sudo service lightdm restart" in a terminal? Well, for some reason LightDM can't be restarted
from a terminal with 'sudo'. However, you can also restart LightDM by
switching to a tty (to switch to tty1 press CTRL + ALT + F1; to switch
back, use CTRL + ALT + F7) and then using the "sudo service lightdm
restart" command.
How to revert the changes
To revert the changes made by following the instructions above, all you need to do is remove the /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf file, by using the following command:sudo rm /etc/lightdm/lightdm.conf.d/50-my-custom-config.conf
Then, restart LightDM as explained under step 4 or reboot your computer.
No comments:
Post a Comment