ssh and ldap

I've got a set up with SunDS5.2 for authentication. Everything seems to be working so far except one thing: ssh.

I use the option "AllowGroups" to limit who can log in to certain servers. However, it isn't working for secondary groups, it only works for primary ones.

For example, I've got the following ldap user and groups:

~# id user1

uid=2000(user1) gid=200(pgroup)

~# groups user1

pgroup ops

If I configure ssh with "AllowGroups pgroup" it works. If however I configure it with "AllowGroups ops" it doesn't.

On the other hand, secondary groups for system users such as "root" do work.

Thanks.

[664 byte] By [_serg_a] at [2007-11-26 14:32:04]
# 1

In case anyone if having the same problem, I reply to myself as I found a solution. The problem seemed to be on the Solaris NSS_LDAP library. I noticed that when doing "getent passwd" it only returned the local users although "getent passwd ldap-user" did return the right info from the LDAP server.

I've replaced nss_ldap by the padl library and it is working as expected now. Thanks.

Sergio.

_serg_a at 2007-7-8 2:27:22 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2
which version of ssh and solaris are you using? i'm running openssh as distributed by blastwave.org (OpenSSH_3.9p1) and AllowGroups works fine against LDAP groups.have you submitted a support case to sun for this?
darinpa at 2007-7-8 2:27:22 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3
also did you try setting 'UsePAM Yes' in sshd_config an reload sshd?
darinpa at 2007-7-8 2:27:22 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4

I'm using the ssh version that comes with Solaris 10 (Sun_SSH_1.1, SSH protocols 1.5/2.0). I did try the blastwave version and with either of them I was getting the same error:

User theuser from X.X.X.X not allowed because none of user's groups are listed in AllowGroups

After the nss_ldap library change, both version, original and blastwave, do work. Another thing is that if I know do "getent passwd" I'm getting the full list of users made of local and ldap accounts.

Sergio.

_serg_a at 2007-7-8 2:27:22 > top of Java-index,Web & Directory Servers,Directory Servers...