pam-auth-update creates a 'common-account' that fails with cached logins
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libpam-ccreds (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Running Ubuntu 11.04 on a Dell Mini 1018 Netbook
On a system running LDAP, Kerberos and Cached Credentials, pam-auth-update creates a 'common-account' file that will always fail if the machine uses cached credentials (presumably because it's offline).
The relevant lines from the common-account file:
# here are the per-package modules (the "Primary" block)
account [success=1 new_authtok_
# here's the fallback if no module succeeds
account requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
account required pam_permit.so
# and here are more per-package modules (the "Additional" block)
account required pam_krb5.so minimum_uid=1000
account [success=ok new_authtok_
# end of pam-auth-update config
This will always fail if the machine is off-line, because pam_unix.so will fail and cause the module to end with the next line which makes pam_deny.so a requisite.
As a patch, I have commented out all of common-account except the line requiring pam_permit.so, but this is unsatisfactory.
Two solutions could be proposed:
* Write a common-account file that will pass if all the component modules fail due to the user or the service being absent. That is - only fail if it is explicitly required to fail, rather than failing if pam_unix.so fails because the user is in ldap or cached.
* Implement a (dummy?) "account" method in pam_ccreds and add that into the relevant profile for cached credentials in pam_auth_update
description: | updated |
> * Implement a (dummy?) "account" method in pam_ccreds and add that into the
> relevant profile for cached credentials in pam_auth_update
That's what needs to happen here. pam_unix has no way of knowing why the user's shadow entry is missing; and arguably this is a bug in your NSS setup anyway rather than anything to do with PAM, because NSS should be cached as well for offline use.