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.

I am using centos 6 and I want to configure ldap server.I need your kind guidence regarding to ldap.conf file. Well if we explore /etc we can see a file ldap.conf and there is a folder openldap which also has ldap.conf file.

The question which I want to ask is why there are two files with same name & which one will be use to configure ldap server.

thanks gardenair

share|improve this question

2 Answers 2

For LDAP server the answer is simple: none of the files you mentioned are correct.

OpenLDAP is configured via /etc/ldap/slapd.conf, or in later incarnations dynamically at /etc/ldap/slapd.d directory. If you still want to configure slapd in the old-fashioned way (slapd.conf file), you can convert the config file to new format with

mkdir /etc/ldap/slap.d
slaptest -f /etc/ldap/slapd.conf -F /etc/ldap/slapd.d 

The /etc/ldap/ldap.conf is a global configuration file for LDAP clients, such as client programs provided by OpenLDAP. /etc/ldap.conf is usually for stuff like pam_ldap or nss_ldap module configuration.

Prepare to consume lots of coffee or other beverages while you try to grasp (Open)LDAP. That thing sure is a beast to get running, though when you get it to run, it just runs and runs trouble-free.

share|improve this answer
    
Your answer is clear.Thanks for the replies. Well I want to configure openldap with samba to authenticate my windows xp & windows 7 users.Currently i am using centos 6.2 The steps which I will follow (in non production enviroment) are 1st I shall configure openldap server then will start configuration for samba server with my linux box. This will authenticate & may a share drive for windows users. Kindly can you sent me the steps so I may follow it? At the moment i am making example.com thanks. –  garden air Mar 6 '12 at 11:18
    
Whoa there! Your quest is still going to require lots of beverages and lots of stuff to read. Even though I'm skilled IT admin, compressing a reply for your question is tough, considering there are books written about LDAP, books written about Samba and books written about Linux + Windows co-operation. Your steps will be: 1) Make OpenLDAP go. 2) Make Samba go. 3) Use winbindd if necessary. 4) Let the Windows users log in. –  Janne Pikkarainen Mar 6 '12 at 11:31
    
thanks.I have already configured samba server only ldap is remaining to integrate with it. sure will read stuff. –  garden air Mar 6 '12 at 11:53

The file /etc/ldap.conf is usually the configuration file for libnss-ldap, which allows querying an LDAP server for account information, groups, netgroups, hosts, and so on. Usage of this library is no longer recommended since modern alternatives like libnss-ldapd and sssd provide the same or more functionality.

The file /etc/openldap/ldap.conf (the path depends on your distro) is the configuration file for the LDAP library in general. Every program that has (Open)LDAP support compiled in, especially ldapsearch, ldapadd, ldapmodify, but also Apache's mod_ldap and others, makes use of this config file. In it you set things like the path to your TLS certificates, default LDAP host, base DNs, SASL mechanisms, and so on.

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.