This is a quick guide for beginners that shows how to remove / disable the Guest account login from Ubuntu 16.04 Unity Greeter.
LightDM configuration files are located in
/etc/lightdm. Disabling Guest account can be easily done by adding a rule into one of the two directories. And below I made a change in
1. Open terminal from Unity Dash, or via Ctrl+Alt+T combination key.
When it opens, paste below command and run to create a sub folder:
sudo mkdir /etc/lightdm/lightdm.conf.d
Type in your password (no visual feedback on typing) when it asks and hit Enter to continue.
2. Running below command to create a “50-no-guest.conf” file under this folder and write the rule
sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" > /etc/lightdm/lightdm.conf.d/50-no-guest.conf'
Now restart your computer and the Guest session disappeared.
3. To revert the changes, just remove the configuration file via command:
sudo rm /etc/lightdm/lightdm.conf.d/50-no-guest.conf
That’s it. Enjoy!
On my install of Ubuntu 16.04 (amd64) the location of the lightdm.conf.d directory is in /usr/share/lightdm.. so use the following command:
sudo sh -c ‘printf “[SeatDefaults]\nallow-guest=false\n” > /etc/lightdm/lightdm.conf.d/50-no-guest.conf’
and to remove:
sudo rm /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf
On the latest official release in Ubuntu 16.04, they changed
[SeatDefaults] to [Seat:*]
Using the first one gives nothing or a bug.
That change in the syntax can be checked in the other files in
If other files show [Seat:*] instead of [SeatDefaults], the 50-no-guest.conf file is to be filled up as following:
That change was initially found by Thee Mahn, builder of Linux Ultimate Edition. Latest version is 5.0 and I suggest anybody to have a blink on it.
Hope this will help.
Great ! .This one worked. The [Seat:*] was a new changed. Thankfully some had noticed. Thanks for the help.