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". Thanks Chu Qiu -----Original Message----- From: pam-list-bounces@xxxxxxxxxx [mailto:pam-list-bounces@xxxxxxxxxx] On Behalf Of Steve Langasek Sent: 2007年8月3日 18:41 To: pam-list@xxxxxxxxxx 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 > "PAM_AUTHINFO_UNAVAIL" > 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@xxxxxxxxxx http://www.debian.org/ _______________________________________________ Pam-list mailing list Pam-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/pam-list _______________________________________________ Pam-list mailing list Pam-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/pam-list