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

RE: Pam-list Digest, Vol 42, Issue 3




Thank you very much!
 
1. Yes, I have already defined the "service" "check_user"
2. Yes, I used the "misc_conv" which defined in the pam_misc.h
 
I changed my "check_user" service file is:
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
 
I get some new results , but i don't unterstand what's going on?
 
1. I login the system as root , and complied my code , then run it , everything is ok
2. I login the system as no-root , run the program complied by root , get this code "PAM_AUTHINFO_UNAVAIL"
3. I login the system as no-root , complied my code ,then run the program , get this code "PAM_AUTHINFO_UNAVAIL"
4. I login the system as no-root ,then run "sudo chmod u+s check_user" on the program i just complied,  run it ,
 I get the code "PAM_AUTHINFO_UNAVAIL"
Please explain for me.
Thank you very much!
 
Chu Qiu
 

From: pam-list-bounces redhat com [mailto:pam-list-bounces redhat com] On Behalf Of Andreas Schindler
Sent: 2007年8月4日 15:56
To: pam-list redhat com
Subject: Re: Pam-list Digest, Vol 42, Issue 3


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.
 
Thank you very much
 
Chu,

there are several things in your program to be checked:
  1. have you already defined the 'service' 'check_user' in your pam.d directory?
    If not, the behaviour will fall back to service 'other', which may be missing too.
  2. Does your conversation function 'conv' as defined in pam_start() work well, i.e.
    does it query for a password? If not, you must supply a password via pam_set_item()
    to make pam_authenticate work.

I suggest, you go and start a debugger (gdb) to look for what your example program
is doing in detail.

Regards,
Andreas
--
Dr.-Ing. Andreas Schindler

PDV Systeme AZ1 GmbH
Frankfurter Str. 141
63303 Dreieich

Telefon 06103-57187-21
Telefax 06103-373245

schindler az1 de
www.az1.de

PDV Systeme AZ1 GmbH, Brandeniusstr. 3, 44265 Dortmund
HRB 11089 Amtsgericht Dortmund, Geschäftsführer : Klaus-Jürgen Koke, Joachim Carle

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