Bug when selecting auto login during install

This seems to be a definite bug somewhere. I don’t know how many distros it happens in, but I know that it happens in Peppermint 8 and in Ubuntu Mate 17.10.

When you install either Peppermint 8 or Ubuntu Mate 17.10 and you tell it to automatically log in, it creates the file /etc/lightdm/lightdm.conf which tells it to login the user name you gave during the install automatically.

However, if you then go into users and groups and tell it to require the password
on login, it still does an automatic login !

The only way to require the password thereafter at login is to either edit that file and comment out the line that allows that user to auto login or else delete that file.

Once you have done that, it will then require the password at login.

If you then go back to users and groups and check for it not to require the password
at login, it will login automatically but it does not create that file, so that if you once again tell it to require the password at login, it will correctly do so.

I found and reported today an issue that may be related:

Seems like the user is not set completely right by LightDM when auto-login is enabled…

Yes, that’s right. When you select automatic login during the install,
it writes a line in the file /etc/lightdm/lightdm.conf to log you in automatically.

But if you decide later that you want to require your password to login and
go to Users/Groups and select require password, it still logs you in automatically
due to the line of code in lightdm.conf which overrides your choice.

In order to require your password to login, you must either delete that line of
code in lightdm.conf or delete the file. Then you’re choice of login will work.

I have 18.04.1,
So I can safely delete “lightdm.conf”, reboot. Interestingly, the username listed in “lightdm.conf” is the machine name. I changed my user name (which was the same as the machine name).

Update: I went ahead and deleted “lightdm.conf” and that corrected the problem. Not sure why the changing the settings under user management does not work?