<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Will this work for RHEL ES 4.5 as well, or are there
modifications needed?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks!<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Bill<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> pam-list-bounces@redhat.com
[mailto:pam-list-bounces@redhat.com] <b>On Behalf Of </b>Vasudeva R<br>
<b>Sent:</b> Monday, July 14, 2008 5:27 PM<br>
<b>To:</b> pam-list@redhat.com<br>
<b>Subject:</b> Re: Bug in pam_tally on Red Hat Enterprise Linux Server release
5.1(Tikanga).<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Thank you Tomas,<br>
<br>
It works perfect.<br>
<br>
My configuration file now looks like this:<br>
<br>
auth       
required      pam_env.so<br>
auth       
required      pam_tally.so onerr=fail per_user deny=3
unlock_time=60<br>
auth        sufficient   
pam_unix.so try_first_pass<br>
auth       
required      pam_deny.so<br>
<br>
account     required     
pam_tally.so<br>
account     required     
pam_unix.so<br>
account     sufficient    pam_succeed_if.so
uid < 500 quiet<br>
account     required     
pam_permit.so<br>
<br>
password    requisite     pam_cracklib.so
minlen=7 ucredit=0 lcredit=-1 dcredit=-1 ocredit=0 retry=3<br>
password    sufficient    pam_unix.so 
use_authtok md5 shadow remember=4<br>
password    required      pam_deny.so<br>
<br>
session     optional     
pam_keyinit.so revoke<br>
session     required     
pam_limits.so<br>
session     [success=1 default=ignore] pam_succeed_if.so
service in crond quiet use_uid<br>
session     required     
pam_unix.so<br>
<br>
Thank you again.<br>
<br>
Appreciate your timely reply with proper solution.<br>
<br>
Regards,<br>
Vasu<o:p></o:p></p>

<div>

<p class=MsoNormal>On Mon, Jul 14, 2008 at 3:27 PM, Vasudeva R <<a
href="mailto:rachamad@gmail.com">rachamad@gmail.com</a>> wrote:<o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><b>Bug in pam_tally on Red Hat
Enterprise Linux Server release 5.1 (Tikanga).</b><br>
<br>
<b>PAM version is: pam-0.99.6.2-3.26.el5</b><br>
<br>
<b>case 1: </b><br>
<br>
following lines works for RHEL-3 & RHEL-4 version with pam-0.77-66.23
version without any problems but not working for RHEL-5<br>
<br>
auth       
required      /lib/security/$ISA/pam_tally.so
onerr=fail no_magic_root<br>
account     required     
/lib/security/$ISA/pam_tally.so per_user deny=3 no_magic_root reset<br>
<br>
- faillog counter just updates number of failed password attempts <br>
- never locks the user account, <br>
- never clears the faillog counter after successful login attempt<br>
<br>
error messages found on /var/log/secure on RHEL-5<br>
<br>
pam_tally(sshd:account): option per_user allowed in auth phase only<br>
pam_tally(sshd:account): option deny=3 allowed in auth phase only<br>
pam_tally(sshd:account): unknown option: no_magic_root<br>
pam_tally(sshd:account): unknown option: reset<br>
<br>
sshd[13368]: PAM service(sshd) ignoring max retries; 6 > 3<br>
<br>
faillog -a user4<br>
<br>
user4          
6        0   07/14/08 15:09:30
-0400<br>
<br>
<b>Case 2: </b><br>
<br>
After modifying system-auth file with respect to the above error messages<br>
<br>
auth       
required      pam_tally.so onerr=fail per_user deny=3 <br>
account     required     
pam_tally.so <br>
<br>
- faillog counter not updating counter for wrong password attempts<br>
- nerver locks the user account for wrong passwords<br>
<br>
<b>Case 3:</b> <br>
<br>
auth       
required      pam_tally.so onerr=fail per_user deny=3
no_magic_root <br>
account     required     
pam_tally.so no_magic_root<br>
<br>
error messages found on /var/log/secure on RHEL-5<br>
<br>
pam_tally(sshd:auth): unknown option: no_magic_root<br>
<br>
- faillog counter updates for wrong password attempts<br>
- nerver locks the user account for wrong passwords<br>
- never clears the faillog counter after successful login attempt<br>
<br>
<b>I do not want to update PAM version on RHEL-5</b><br>
<br>
<b>Appreciate if i get reply with bug fix solution.</b><br clear=all>
<br>
-- <br>
Regards, <br>
<span style='color:#888888'>Vasudeva R</span><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br clear=all>
<o:p></o:p></p>

</div>

</div>

</body>

</html>