ritchie-w
December 23rd, 2010, 05:24 PM
Hi,
I am trying to get my PAM function running on kubuntu 10.10, but I failed.
strcpy( userID,(char*) ((const char*) UserIdent.toLatin1()));
strcpy( upassword,(char*) ((const char*) Password.toLatin1()));
retval = pam_start(PAM_SERVICENAME, userID, &pam_convert, &pamhandle);
if (retval == PAM_SUCCESS)
{
retval = pam_authenticate(pamhandle, PAM_SILENT );
if (retval == PAM_SUCCESS)
The function "pam_start" gets PAM_SUCCESS back which is ok, but the function "pam_authenticate" returns "PAM_AUTH_ERR".(Wrong password or
insuffert rights)
The function is working with the actual logined in user of the desktop, but when I use an other user it fails.
The PAM definition file in /etc/pam.d/ .. looks like :
#
# default; standard UN*X access
#
auth required pam_unix.so debug
account required pam_unix.so debug
When I run the program with "sudo ", everything works fine.
Why do I need "root" right to access such functions ? Is there a way to do it without "root" rights.
Thanks for help
R.
I am trying to get my PAM function running on kubuntu 10.10, but I failed.
strcpy( userID,(char*) ((const char*) UserIdent.toLatin1()));
strcpy( upassword,(char*) ((const char*) Password.toLatin1()));
retval = pam_start(PAM_SERVICENAME, userID, &pam_convert, &pamhandle);
if (retval == PAM_SUCCESS)
{
retval = pam_authenticate(pamhandle, PAM_SILENT );
if (retval == PAM_SUCCESS)
The function "pam_start" gets PAM_SUCCESS back which is ok, but the function "pam_authenticate" returns "PAM_AUTH_ERR".(Wrong password or
insuffert rights)
The function is working with the actual logined in user of the desktop, but when I use an other user it fails.
The PAM definition file in /etc/pam.d/ .. looks like :
#
# default; standard UN*X access
#
auth required pam_unix.so debug
account required pam_unix.so debug
When I run the program with "sudo ", everything works fine.
Why do I need "root" right to access such functions ? Is there a way to do it without "root" rights.
Thanks for help
R.