lightdm cannot autologin based on UID
Bug #1260385 reported by
Ritesh Khadgaray
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Light Display Manager |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
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 - https:/
[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
lp:~mterry/lightdm/autologin-uid
Rejected
for merging
into
lp:lightdm
- PS Jenkins bot: Approve (continuous-integration)
- LightDM Development Team: Pending requested
-
Diff: 247 lines (+119/-5)10 files modifieddata/lightdm.conf (+1/-1)
src/accounts.c (+18/-0)
src/accounts.h (+2/-0)
src/seat.c (+30/-4)
tests/Makefile.am (+4/-0)
tests/scripts/autologin-uid-invalid.conf (+31/-0)
tests/scripts/autologin-uid.conf (+27/-0)
tests/src/test-runner.c (+2/-0)
tests/test-autologin-uid (+2/-0)
tests/test-autologin-uid-invalid (+2/-0)
lp:~khadgaray/lightdm/1.2-auologin-uid
Ready for review
for merging
into
lp:lightdm/1.2
- LightDM Development Team: Pending requested
-
Diff: 248 lines (+125/-7)10 files modifieddata/lightdm.conf (+1/-1)
src/accounts.c (+18/-0)
src/accounts.h (+2/-0)
src/seat.c (+34/-6)
tests/Makefile.am (+6/-0)
tests/scripts/autologin-uid-invalid.conf (+31/-0)
tests/scripts/autologin-uid.conf (+27/-0)
tests/src/test-runner.c (+2/-0)
tests/test-autologin-uid (+2/-0)
tests/test-autologin-uid-invalid (+2/-0)
To post a comment you must log in.
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: user=username
[SeatDefaults]
autologin-
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.