<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:20070804160009.DAB7173195@hormel.redhat.com"
 type="cite"><br>
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.6000.16481" name="GENERATOR">
  <div><span class="625443921-03082007"><font face="宋体">I'm studying on
pam library , and I run the code given by "The Linux-PAM Application
Developer's Guide" on redhat linux.</font></span></div>
  <div><span class="625443921-03082007"></span> </div>
  <div><span class="625443921-03082007"><font face="宋体">"retval =
pam_authenticate(pamh, 0);" is running successfully</font></span></div>
  <div><span class="625443921-03082007"></span> </div>
  <div><span class="625443921-03082007"><font face="宋体">but the next
"retval = pam_acct_mgmt(pamh, 0);" return "PAM_AUTHINFO_UNAVAIL"</font></span></div>
  <div><span class="625443921-03082007"></span> </div>
  <div><span class="625443921-03082007"><font face="宋体">I don't know
what problem is it? Please do me a favour.</font></span></div>
  <div><span class="625443921-03082007"></span> </div>
  <div><span class="625443921-03082007"><font face="宋体">Thank you very
much</font></span></div>
  <div><span class="625443921-03082007"></span> </div>
</blockquote>
Chu,<br>
<br>
there are several things in your program to be checked:<br>
<ol>
  <li>have you already defined the 'service' 'check_user' in your pam.d
directory?<br>
If not, the behaviour will fall back to service 'other', which may be
missing too.</li>
  <li>Does your conversation function 'conv' as defined in pam_start()
work well, i.e.<br>
does it query for a password? If not, you must supply a password via
pam_set_item()<br>
to make pam_authenticate work.</li>
</ol>
<br>
I suggest, you go and start a debugger (gdb) to look for what your
example program<br>
is doing in detail.<br>
<br>
Regards, <br>
Andreas<br>
<div class="moz-signature">-- <br>
Dr.-Ing. Andreas Schindler<br>
<br>
PDV Systeme AZ1 GmbH<br>
Frankfurter Str. 141<br>
63303 Dreieich<br>
<br>
Telefon 06103-57187-21<br>
Telefax 06103-373245<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:schindler@az1.de">schindler@az1.de</a><br>
<a class="moz-txt-link-abbreviated" href="http://www.az1.de">www.az1.de</a><br>
<br>
PDV Systeme AZ1 GmbH, Brandeniusstr. 3, 44265 Dortmund<br>
<small>HRB 11089 Amtsgericht Dortmund, Geschäftsführer : Klaus-Jürgen
Koke, Joachim Carle</small>
</div>
</body>
</html>