<HTML>
<HEAD>
<TITLE>RE: [389-users] Access.conf issue</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
The user is a part of both groupname and groupname2. I am in testing with different combinations.<BR>
<BR>
<I>UsePAM yes </I>is set in /etc/ssh/sshd_config<BR>
<BR>
Reason for using pam_member_attribute uniquemember is because 389-ds groups uses that attribute for group members.(see schema below) So to tell the ldap.conf to look at that attribute to verify members.  CORRECT ME IF I AM WRONG<BR>
<BR>
This is the schema of my groups<BR>
<I>dn: cn=GroupName,ou=Groups, dc=domain, dc=com<BR>
 gidNumber: 1010<BR>
 objectClass: top<BR>
 objectClass: groupOfUniqueNames<BR>
 objectClass: posixGroup<BR>
<B> uniqueMember:</B> uid=username1,ou=People,dc=domain,dc=com<BR>
 uniqueMember: uid=username2,ou=People,dc=domain,dc=com<BR>
 cn: GroupName<BR>
</I><BR>
True, I tried to put the<I> account required pam_access.so </I>to the pam.d/sshd, but since it already includes the <I>system-auth</I>(which already has pam_access). Hence I didn;t add manually to sshd.<BR>
<BR>
/etc/pam.d/sshd<BR>
<B><I>auth       include      system-auth<BR>
</I></B><I>account    required     pam_nologin.so<BR>
account    include      system-auth<BR>
account    required     pam_access.so<BR>
password   include      system-auth<BR>
session    optional     pam_keyinit.so force revoke<BR>
session    include      system-auth<BR>
session    required     pam_loginuid.so<BR>
</I><BR>
<B>What I am trying to accomplish?<BR>
</B>I am trying to restrict  the ssh access to all our servers based on the groupmembership of posixgroups(groupname1 & 2). So say if a user does not belong to that project he/she should not be able to ssh to that box. <BR>
<BR>
<B>Extra info which might or not be related</B>: I am using Primary Group for all users as their uidNumber. I think it is called “User Private Groups” where each user’s uidNumber and gidNumber are same. This is to facilitate the file/folders ownership in their home folder by using umask 022.<BR>
<BR>
Stpierre from #389 IRC channel suggested that the syntax for posixGroups in access.conf is not @groupname. But to change it something like below.<BR>
<BR>
- : ALL EXCEPT root groupname groupname2 : ALL<BR>
<BR>
<BR>
Thanks for you help.<BR>
<BR>
-Prashanth<BR>
<BR>
</SPAN></FONT><UL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><I>From</I>: "Tidwell Robert - rtidwe" <Robert Tidwell acxiom com> 
</SPAN></FONT><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><I>To</I>: <fedora-directory-users redhat com> 
</SPAN></FONT><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><I>Subject</I>: RE: [389-users] Access.conf issue 
</SPAN></FONT><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><I>Date</I>: Wed, 18 Nov 2009 11:15:32 -0600 <BR>
</SPAN></FONT></UL><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><HR ALIGN=CENTER SIZE="3" WIDTH="100%"><I>Title: <B>Access.conf issue</B></I> <BR>
Is your user a part of the groupname or groupname2 group?    And, is “UsePAM yes” and set in your sshd_config?   Although, I am not sure that the pam_member_attribute uniquemember is going to work in this situation.  Pam is looking to evaluate that the user is a member of the group that you specify for “pam_groupdn” in ldap.conf.    Based on what you are saying, you are simply using pam_access to control ssh access to the server.  But instead of the pam_access line being in system_auth, I have it in /etc/pam.d/sshd, which it looks like yours is also based on the error messages.      Robert<BR>
</SPAN></FONT>
</BODY>
</HTML>