lightdm ask ldap administrator password when changing an expired password
Bug #1270118 reported by
Gabriel
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Light Display Manager |
Fix Released
|
Medium
|
Robert Ancell | ||
1.2 |
Fix Released
|
Medium
|
Robert Ancell | ||
1.4 |
Fix Released
|
Medium
|
Robert Ancell | ||
1.8 |
Fix Released
|
Medium
|
Robert Ancell | ||
lightdm (Debian) |
Fix Released
|
Unknown
|
|||
lightdm (Ubuntu) |
Fix Released
|
Medium
|
Bartosz Kosiorek | ||
Precise |
Fix Released
|
Medium
|
Bartosz Kosiorek | ||
Saucy |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
[Impact]
LightDM does not correctly use PAM to change users passwords when they expire. This causes some PAM modules (e.g. pam_ldap) to not correctly perform password changing.
[Test Case]
1. Setup LDAP logins
2. Expire users password
3. Attempt to log into greeter
Expected result:
- User is prompted to change password. Password limitations are correctly enforced.
Observed result:
- User is prompted to change password. Password limitations are not correctly enforced.
[Regression Potential]
Any PAM module that relied on the previous incorrect behaviour might behave differently. It is not expected that any module would intentionally do this.
Related branches
lp://staging/~robert-ancell/lightdm/chauthtok
- PS Jenkins bot: Approve (continuous-integration)
- Robert Ancell: Approve
-
Diff: 41 lines (+6/-3)3 files modifiedsrc/session-child.c (+1/-1)
tests/scripts/login-new-authtok.conf (+1/-1)
tests/src/libsystem.c (+4/-1)
tags: | added: ldap |
Changed in lightdm: | |
status: | New → Confirmed |
information type: | Public → Private |
Changed in lightdm (Debian): | |
status: | Unknown → Confirmed |
Changed in lightdm: | |
assignee: | nobody → Robert Ancell (robert-ancell) |
Changed in lightdm (Debian): | |
status: | Confirmed → Fix Released |
Changed in lightdm (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in lightdm: | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
information type: | Private → Public |
Changed in lightdm (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in lightdm (Ubuntu Saucy): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in lightdm (Ubuntu Precise): | |
status: | New → Triaged |
information type: | Public → Private |
Changed in lightdm: | |
milestone: | none → 1.9.7 |
Changed in lightdm (Ubuntu Precise): | |
assignee: | nobody → Robert Ancell (robert-ancell) |
status: | Triaged → In Progress |
Changed in lightdm: | |
status: | Fix Committed → Fix Released |
Changed in lightdm (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Robert Ancell (robert-ancell) |
To post a comment you must log in.
Hi, I confirm this issue (also in trunk).
It's apparently due to an "improper" use of flags in pam_chauthtok call (session- child.c: 337).
Because lightdm calls pam_chauthtok after a positive check on PAM_NEW_ AUTHTOK_ REQD (from man page "The user account is valid but their authentication token is expired") it should pass the PAM_CHANGE_ EXPIRED_ AUTHTOK flag (from man page "This argument indicates to the modules that the users authentication token (password) should only be changed if it has expired"). worker. c:1291) .
gdm3 uses the flag correctly (gdm-session-
Without the flag "the application requires that all authentication tokens are to be changed" (pam man) so you need to provide the LDAP admin credentials.
To solve simply change the line about chauthok in session-child.c (line 291 for lightdm-1.2.2 of wheezy) from
authentication_ result = pam_chauthtok (pam_handle, 0 );
to
authentication_ result = pam_chauthtok (pam_handle, PAM_CHANGE_ EXPIRED_ AUTHTOK );
If you want to patch the Debian Wheezy package: 1.2.2-4_ i386.deb (step-back to the initial folder) 1.2.2-4_ i386.deb) and start it (invoke-rc.d lightdm start)
1) download lightdm debian source package: apt-get source lightdm
2) go to the source folder lightdm-1.2.2/src and edit session-child.c as suggested
3) step-back to the lightdm-1.2.2 folder and run dpkg-buildpackage -rfakeroot -uc -b (dpkg-buildpackage may require some packages to proceed, it lists the required packages, install these with apt-get install <package-list>)
4) if dpkg-buildpackage completes without errors you have your lightdm_
5) stop lightdm (invoke-rc.d lightdm stop) and remove it (apt-get remove lightdm)
6) install your lightdm package (dpkg -i lightdm_
That should be fixed because as it is no one can use lightdm with ldap when a periodic password change is required.