Search code examples
linuxpam

/bin/login checks passwd despite passing pam account checks


To learn the basics of a PAM, I wrote a highly permissive module that returns PAM_SUCCESS for all of the checks (auth, account, password, session). So theoretically, one should be able to login with any username, even those not listed in /etc/passwd, right?

However, it looks like /bin/login performs an account check on its own accord! How do I disable this, so I can let any username login? (for purely theoretical purposes).

My module's log:

pam_sm_authenticate:AUTH request for notinpasswd, allowing it
pam_sm_acct_mgmt:ACCT request, allowing it
Invalid user name "notinpasswd" in pam_open:670. Abort.            -- printed by /bin/login

Here is my pam.d/other config:

auth      required   pam_open.so
account   required   pam_open.so
password  required   pam_open.so
session   required   pam_open.so

Solution

  • Well considering that a user has to have a shell available it may be worth lookimg into using a username that IS real. Have you tried that? If so.let me know and ill dig around but off the top of my head a valid shell and user is required.