LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Issues with OpenLDAP in RHEL6 (https://www.linuxquestions.org/questions/linux-server-73/issues-with-openldap-in-rhel6-885890/)

manyrootsofallevil 06-12-2011 07:31 AM

Issues with OpenLDAP in RHEL6
 
I have followed the instructions, if you can call them that, from red hat to install openLDAP on a RHEL6 box.

I configured the old fashioned slapd.conf file, deleted /etc/openldap/slap.d and ran
Code:

slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/
After setting the right permissions on the slapd.d directory, I managed to get the service started and I get this error:
Quote:

bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).
Expect poor performance for suffix "dc=domain,dc=com"
Unfortunately, I have no DB_CONFIG example file to copy to this directory, but since this appears to be a warning, I'm hoping that it can be ignored.

The problem I have, assuming that the above is not a deal breaker, is when I try to add users to the domain:

Quote:

ldapadd -f ldapuser -x -W -D "cn=root,dc=domain,dc=com"
Enter LDAP Password:
adding new entry "cn=Barbara Jensen,dc=rh,dc=com objectClass: person cn: Barbara Jensen sn: Jensen mail: bjensen@rh.com uid: bjensen"
ldap_add: Protocol error (2)
additional info: no attributes provided
where ldapuser contains:
Quote:

dn: cn=Barbara Jensen,dc=rh,dc=com
objectClass: person
cn: Barbara Jensen
sn: Jensen
mail: bjensen@rh.com
uid: bjensen
The file is from the man page for ldapadd.

any ideas?

TIA

scottro11 06-12-2011 07:47 AM

I'm going to spam my own page, though it has mostly been tested on CentOS 5.x, rather than RHEL6. However, it also works on Fedora.

http://home.roadrunner.com/~computertaijutsu/ldap.html


I'm not a big fan of RH's documentation so can understand your frustration. And as for LDAP, I love the quote from the ldap for rocket scientists page (the link i posted above has a link to that site)
Quote:

The bad news is that IOHO never has so much been written so incomprehensibly about a single topic with the possible exceptions of BIND

manyrootsofallevil 06-12-2011 10:20 AM

Quote:

Originally Posted by scottro11 (Post 4383312)
I'm going to spam my own page, though it has mostly been tested on CentOS 5.x, rather than RHEL6. However, it also works on Fedora.

http://home.roadrunner.com/~computertaijutsu/ldap.html


I'm not a big fan of RH's documentation so can understand your frustration. And as for LDAP, I love the quote from the ldap for rocket scientists page (the link i posted above has a link to that site)

Thanks for that. Nothing like a little bit of shameless plugs, if it works for university professors, it ought to work for everybody else right?

The only real difference between 5 & 6 is the deprecation of slapd.conf, but as I mentioned in the previous post, using slaptest will create the new type of configuration in /etc/openldap/slapd.d/

My problem was poor formatting of the ldapuser file, which did not show up in the post.

So I did
Code:

ldapadd -xf first.ldif -D "cn=root,dc=domain,dc=com" -W
where first.ldif is a copy of the one you kindly provided in your web page
and then I could add users to the people ou.

Thanks for you help


All times are GMT -5. The time now is 12:32 AM.