Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to automate the installation of my OpenLDAP servers.

Currently packages get installed (openldap-clients, openldap-servers) and started with their default configurations.

I have a LDIF file, that is supposed to modify the cn=config database.

I would like to know how can I use ldapmodify to apply my modifications without having to change anything in the configuration first (enable nsldapi, olcRootPW, etc...).

Is it possible to striclty rely on the fact that my user is root ? When I see this line I guess it's possible, but I didn't find the way to do it yet

olcAccess: {0}to *  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage  by * none

I think what I am looking for is called AutoBind, but it seems like it stil requires LDAPI to be enabled first.

share|improve this question

1 Answer 1

By default, when installing OpenLDAP packages on CentOS, the ldapi is not enabled.

You can verify that by looking at the /var/run/openldap/slapd.args, output looks like this

/usr/bin/slapd -h ldap:/// -u ldap

thus ldapapp -Y EXTERNAL -H ldapi:/// -f xxx.ldif failing.

One need to enable ldapi for its openldap servers. To so so simply edit /etc/sysconfig/ldap and set SLAPD_LDAPI=yes.

Restart the OpenLDAP server and rerun the command. It should work fine.

share|improve this answer

Your Answer

 
discard

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.