Hi all!
I'm currently in the process of upgrading my home security to using Kerberos. It was previously done with NIS, but now I've mangled the passwords in the NIS maps.
I'm having a slight problem, though, which I'm not sure how to solve in a nice way. I want to have PAM support for both pam_unix and pam_krb5, so that root can log in with his locally stored password in case the network goes down for any reason. And here's the problem: account management. Here's what I have now in my PAM config regarding account management:
Code:
account sufficient pam_unix.so
account sufficient pam_krb5.so
account required pam_deny.so
As you can see, that lets a user through if he has either a valid UNIX account OR a valid Kerberos account, and naturally that's not what I want. I want the account to be invalid if the Kerberos account is explicitly invalid, but the UNIX account to be checked if the user doesn't have a Kerberos principal (is with root). So what I'd like is something like this:
Code:
account ultimate pam_krb5.so ignore_nonexistant
account required pam_unix.so
The ignore_nonexistant option would imply that the pam_krb5 module should return PAM_IGNORE if the user doesn't have a Kerberos principal. The control flag ultimate would imply that the stack returns immediately with the result returned by pam_krb5 as long as it is not PAM_IGNORE.
However, as far as I know, neither 'ultimate' nor 'ignore_nonexistant' exist. Does anyone know of a way to work around this, or do I have to rewrite both my PAM and pam_krb5?