lightdm cannot autologin based on UID

Bug #1260385 reported by Ritesh Khadgaray on 2013-12-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager

Bug Description


   We have a mass deployment of ubuntu, and would like to have their laptops autologin based of UID (1000, the first user), as this is the only common factor between all the systems that are being imaged.

[Test Case]
 * With the attached patch, user can login by specifying "uid:1000" for "autologin-user" .
 * autologin guide at -

[Regression Potential]
  * none that I could see. not heavily tested.

[Other Info]
 * Needs to be pushed into trusty & precise ( and q/r & s optionally )

Related branches

Robert Ancell (robert-ancell) wrote :

I don't see a good requirement for this feature.

Problems I see with this feature are:
- It's a niche feature that seems unlikely to be widely used (feature creep)
- Encouraging sysadmins to refer by UID is somewhat dangerous as adding/removing users could easily lead to the wrong user being automatically logged in
- It is unwise to configure the autologin user at the time lightdm is installed as opposed to when the user account is created - you could end up with lightdm having an invalid configuration.
- This adds some unnecessary complexity to lightdm - it now has to handle the UID conversion and handle all the failure cases.

The current version of lightdm in precise makes it difficult to support static configuration as only one configuration file is available (/etc/lightdm/lightdm.conf) and this is owned by the lightdm package (so it is managed by dpkg). For this reason, there is a strong case to backport the lightdm.conf.d support and this is being done (bug 119042).

With the conf.d support I'd recommend doing the following:

At the time of user creation create the file /etc/lightdm/lightdm.conf.d/50-autologin.conf:

You would either do this in the package that creates the user or the script that is run to setup this machine. The user creation process would involve modifying /etc/passwd, /etc/groups, /etc/shadow and creating /etc/lightdm/lightdm.conf.d/50-autologin.conf. All these files would be dynamic and unmanaged by dpkg.

When you remove this user remove /etc/lightdm/lightdm.conf.d/50-autologin.conf so LightDM remains correctly configured.

Robert Ancell (robert-ancell) wrote :

Closing as we don't want to support this feature.

Changed in lightdm:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers