<div>I see. </div>
<div>In summary, PAM is still difficult for using two passwords for two different ways, right?</div>
<div>I will try to read more about PAM to see if so.</div>
<div>Thanks.<br><br> </div>
<div><span class="gmail_quote">On 5/30/07, <b class="gmail_sendername">Les Mikesell</b> <<a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Wei Yu wrote:<br>> Could you give more details? I am not familiar with PAM.<br>> I know it can use some "plugged" auth methods to do some job, but I do
<br>> not know which plug is suitable.<br><br>If you are running Centos, all of your system authentication is probably<br>being done by PAM for all programs that take a login and password except<br>for apache.  If you run 'authconfig' you can set one or more methods
<br>that are then used by everything.  However, each service may still be<br>configured separately.  If you look in the /etc/pam.d directory you will<br>see a file for each service that contains the steps to follow.  The<br>
references to system-auth include the list built by authconfig - but you<br>can change it per file if you want.<br><br>> What I want is just like Richardson's remarks. I want to use two auth<br>> methods for web users and users who can have a shell, which the former
<br>> will care less about the security of the password. e.g. two different<br>> passwords for them.<br>> I do want to know if there are better solutions.<br><br>If you really want your web access to be separate, PAM may not be the
<br>way to go.  Apache has a large number of internal authentication and<br>authorization modules that can be used instead.  However, if you want to<br>combine them, you can install the mod_auth_pam apache module and use a
<br>/etc/pam.d/httpd file like:<br><br>#%PAM-1.0<br>auth       required     pam_stack.so service=system-auth<br>account    required     pam_permit.so<br><br>This uses the set of steps configured by authconfig to check a<br>
login/password pair but does not require any account info.  In my case I<br>have smb authentication against a windows domain plus local linux<br>accounts configured for the system. (The local account access requires<br>making the /etc/shadow file readable by apache which is a downside).
<br>This lets anyone in the windows domain log in for web services but<br>services like ssh or other login facilities will require account entries<br>that won't exist unless I add users to the system.  In the latter case,
<br>either the domain or local passwords will work.<br><br>--<br>  Les Mikesell<br>   <a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a><br>_______________________________________________<br>CentOS mailing list
<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a><br></blockquote></div><br><br clear="all"><br>-- 
<br>Zijing 15# 1404B Tsinghua Univ.<br>+86 -10 -51537235<br>Zig