[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: A problem using pam library in C

Thank you very much!

No , I'm not root, but the root have modify the sudoer file ,let me can run
any command with NoPasswd.

Also, I think I  have given the program I complied with root rights ,
because I have run the "chmod u+s check_user".


Chu Qiu

-----Original Message-----
From: pam-list-bounces redhat com [mailto:pam-list-bounces redhat com] On
Behalf Of Steve Langasek
Sent: 2007年8月3日 18:41
To: pam-list redhat com
Subject: Re: A problem using pam library in C

On Fri, Aug 03, 2007 at 05:45:51PM -0400, Chu Qiu wrote:
> I'm studying on pam library , and I run the code given by "The 
> Linux-PAM Application Developer's Guide" on redhat linux.

> "retval = pam_authenticate(pamh, 0);" is running successfully

> but the next "retval = pam_acct_mgmt(pamh, 0);" return 

> I don't know what problem is it? Please do me a favour.

Are you running your program as root?

> # check authorization
> auth required pam_unix.so
> account required pam_unix.so

The pam_unix module's accounting component requires being able to access
/etc/shadow to retrieve this information.  In recent versions of pam_unix, a
helper binary can be used to retrieve this information on behalf of a
non-root application; but you may not have a new enough pam_unix or you may
have a configuration problem elsewhere.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon debian org                                   http://www.debian.org/

Pam-list mailing list
Pam-list redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]