Sudo for PAM authenticated users

radiatejava radiatejava at gmail.com
Thu Oct 3 05:20:20 UTC 2019


Hi PAM team
I have a requirement - I authenticate users that do not exist in
/etc/passwd via PAM module where I set the unix_user_id, PAM_USER etc.
While the PAM_USER value coming from PAM module is just a dummy
username coming from my pam module and it is added in /etc/passwd to
have a shell for the user, unix_user_id is not available in
/etc/passwd.

This appear to work fine as far as starting the shell is concerned, I
am not able to do any sudo calls. It gives me the error:

sudo: PAM account management error: Authentication service cannot
retrieve authentication info

So looks like basically, it is trying to fetch the user info for the
userid that does not exist. How can I support this? How can I do sudo
for users authenticated via pam and not existing in /etc/passwd ?




More information about the Pam-list mailing list