PAM example: login.c

PAM example: login.c

pam_start(“login”, username, &handle);

while (not_authenticated && retry < 3)

pam_authenticate(handle);

error = pam_acct_mgmt(handle);

if (error == PAM_AUTHTOK_EXPIRED)

pam_chauthtok(handle);

pam_open_session(handle);

pam_setcred(handle);

pam_end(handle);

Previous slide Next slide Back to the first slide View Graphic Version