Comment 0 for bug 799605

Nick Piggott (nick-piggott) wrote :

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_reqd=done default=ignore]
# here's the fallback if no module succeeds
account requisite
# 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
# and here are more per-package modules (the "Additional" block)
account required minimum_uid=1000
account [success=ok new_authtok_reqd=done ignore=ignore user_unknown=ignore authinfo_unavail=ignore default=bad] minimum_uid=1000
# end of pam-auth-update config

This will always fail if the machine is off-line, because will fail and cause the module to end with the next line which makes a requisite.

As a patch, I have commented out all of common-account, 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 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