Authenticate myself!? Service name!?

Muscarella, Fabrizio fabrizio.muscarella at sap.com
Fri Jun 24 10:03:34 UTC 2005


Hello All,

I implement currently the authentication in a daemon that I'm writing.
In the implementation I encountered 2 problems with pam:

1) I want to find out if a specific pam-service is installed or not.
Naturally I don't find really useful to lookup myself /etc/pam.d or to
parse /etc/pam.conf or ... I try to call pam_start with the service
name, and the with pam_get_item(..,PAM_SERVICE,..) to get the name of
the loaded module, but unfortunately it return just the name of the
requested pam-service, and not the real loaded service name (I request
the service "foo", pam doesn't find it an load "other", but the returned
name from pam_get_item was "foo"). Do anybody know if there is a way to
resolve this problem?

2)I want to authenticate the user running the process. But unfortunately
if the user is a shadow user (also the password is in the /etc/shadow
file), this doesn't work, because my process run as not privileged user.
There is a way with pam to solve this issue? I try to look at the code
of xscreensaver, but doesn't help.

Thank You all in advance, 
Fabri




More information about the Pam-list mailing list