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

Is it recommended to add users/modify properties of users to OpenLDAP after stopping the service ? I have been facing issues on adding users when the OpenLDAP server is running.

I am using scripts from padl.com or manually editing creating ldif files and using ldapmodify.

share|improve this question
    
What tool do you add users at the moment? –  TRS-80 Dec 27 '10 at 11:40
    
I am using scripts from padl.com –  nitins Dec 27 '10 at 11:52
    
the ldap DB was corrupted. fixed it with /usr/sbin/slapd_db_recover -v -h /var/lib/ldap –  nitins Dec 28 '10 at 7:04

3 Answers 3

up vote 3 down vote accepted

To add entries to OpenLDAP directory, two command line utilities distributed with openldap can be used - ldapadd and slapadd.

Even with the similar names, their workings are very different.

ldapadd connects to a running instance of ldap directory and adds the specified ldif as a normal client.

slapadd modifies directly the underlying files that slapd daemon uses. So, it should not be run when slapd server is running (and generally should only be used to initiate a new database).

Make sure your scripts are using the proper utilities in proper situation.

share|improve this answer
    
thanks for the info –  nitins Dec 28 '10 at 6:04

I use cpu-ldap to add users to LDAP, it works fine while the server is running (and in fact can't be used unless it is).

share|improve this answer

Consider the question for a moment. You would like to use LDIF (LDAP Interchange Format) to update an LDAP directory server, and you think it would make sense to do it when the service is not running?

LDIF as the name suggests uses the LDAP protocol to connect and perform transactions.

By what mechanism do you suggest such an approach would work if the service were not running?

share|improve this answer
    
yes you are correct. –  nitins Dec 27 '10 at 13:26
    
But is there recommended way of adding users ? –  nitins Dec 27 '10 at 13:27
    
@nitins Use an LDIF. or some tool that does the same under the covers. –  geoffc Dec 27 '10 at 19:11

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.