While the Guest session can be useful for some people, I’ve generally considered it to be security vulnerability as unauthorized users could gain physical access to some areas of your system that are not secured as well as they “should” be.
Additionally, the default behavior that allows for the username(s) to be stored and listed on the login screen are less than ideal.
Here we remove both!
- Create the config folder:
sudo mkdir -p /etc/lightdm/lightdm.conf.d
- Create a new config file:
sudo vi /etc/lightdm/lightdm.conf.d/10-ubuntu.conf
- Add the following:
Ubuntu continues to make great strides with improvement to the User Interface for the ‘common’ user. Unfortunately this sometimes comes at the cost of security. 12.10 added a “Guest” account to the launch screen, to allow a new session to be opened. This is not always useful as it represents a potential security concern.
A single line command and reboot will remove it:
sudo sh -c 'echo "allow-guest=false" >> /etc/lightdm/lightdm.conf'
Similarly “Remote Login” can also be hidden/removed.
sudo sh -c 'echo "greeter-show-remote-login=false" >> /etc/lightdm/lightdm.conf'
WARNING: This will cause some problems in 15.10 (and likely some earlier versions before). See the following for the new method.
sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" >/usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'