Operating System - HP-UX
1833044 Members
2602 Online
110049 Solutions
New Discussion

LDAP netgroup problem (Continued)

 
Glenn_73
New Member

LDAP netgroup problem (Continued)

I have been having exactly the same problem as described in the "LDAP netgroup problem" thread by Alec Pringle 3/2/2005.

I tried the solution from that thread and at first glance it appears to work. I can now access the userids in the ldap directory. The problem is I can now access ALL the userids in the directory. The solution essentially turns off the netgroups.

I need to restrict access to the client to only those users in teh directory who are members of the netgroup.

Any ideas?
3 REPLIES 3
RAC_1
Honored Contributor

Re: LDAP netgroup problem (Continued)

On the client, where you want to restice the access, you need to modify the /etc/passwd file as follows.

+@group_name

If you have + in /etc/passwd file, then all users will get access on this host.

man passwd for details.
There is no substitute to HARDWORK
Glenn_73
New Member

Re: LDAP netgroup problem (Continued)

Yes indeed. My /etc/passwd has the +@group_name: at the end.

With the "passwd: compat" etc in the nsswitch it seems to recognize that it has to deal with netgroups. With the nsswitch set to "passwd: files [NOTFOUND] ldap" it appears to ignore the +@group thing and allow access to all the userids in the ldap directory.

This behavior make sense to me.

Perhaps another hint:

The finger comand appears to understand the netgroups and who is in it. Other commands like groups and su do not. In other words: when I have the "passwd:compat" in the nsswitch, and the +@group in the /etc/passwd, a finger will only show the userids in the valid netgroups. Other commands respond with "no such user".

As with Alec Pringle's thread, this all seems to work OK on my Solaris clients.
RAC_1
Honored Contributor

Re: LDAP netgroup problem (Continued)

You certaily do not need
passwd : compact (It is for file and nis environment.)

You need as follows.

passwd: files [NOTFOUND=continue] ldap
group : file [NOTFOUND=continue] ldap
netgroup : ldap
There is no substitute to HARDWORK