I am authenticating a user and I want to determine if the user is known (a valid existing username) or unknown.
int ret = pam_authenticate(pamh, PAM_DISALLOW_NULL_AUTHTOK);
Now even if the username is unknown, pam_authenticate
returns PAM_AUTH_ERR
instead of (expected) PAM_USER_UNKNOWN
.
How to find if the username is known or not?