Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an OpenLDAP directory with two different doamins (DN's) What I would like to do is allow the users to access the machines with ssh and their LDAP account. This worked fine when I only had one Directory in LDAP, but I am not able to get it working with two directories.

I've searched and tried for an solution, without any luck. Is anyone able to help me with this? I've tried to add a second base to /etc/libnss-ldap.conf but it does only allows for me lookup entries in the latter LDAP directory.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you use nslcd you can have multiple entries in nslcd.conf for base.

man nscld.conf:

   base [MAP] DN
          Specifies  the  base distinguished name (DN) to use as search base.  This option may be supplied multiple times and all specified bases will
          be searched.
share|improve this answer
Thank you, this worked very well. The only problem is that if a user with the same username exists in both OU, it does not skip to the next OU on wrong password, butr i guess that got to do with how SSH is. Anyways this will work greate until i can merge the two domains :-) Thank you. – ChosSimbaOne Jun 25 '13 at 7:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.