Pages

Thursday 15 August 2013

Configuring OpenLDAP Server/Client on RHEL 6 / CentOS 6


Step 1. Install OpenLDAP packages via YUM 
#yum install openldap*

Step 2. Now generate a encrypted password for Administrator User That is "Manager"
#slappasswd 
New password: redhat
Re-enter new password: redhat
{SSHA}dXK/BmC+DrrbwvAWYaPvA5omy6EqvUnX

The above command will generate the password something like 
"{SSHA}dXK/BmC+DrrbwvAWYaPvA5omy6EqvUnX

NOTE: You need to copy above generated password

Step 4. Now Configure OpenLDAP Server, so edit the following file:
#vim /etc/openldap/slapd.d/"cn=config"/"olcDatabase={2}bdb.ldif"

Inside this file do the following changes:
olcSuffix: dc=example,dc=com

olcRootDN: cn=Manager,dc=example,dc=com

Inside this file create the following lines:
olcRootPW: <PASTE YOUR ENCRYPTED PASSWORD HERE>
olcTLSCertificateFile: /etc/pki/tls/certs/example.pem
olcTLSCertificateKeyFile: /etc/pki/tls/certs/examplekey.pem


:wq (save and exit) 


Step 5. Now specify the Monitoring privileges 
#vim /etc/openldap/slapd.d/"cn=config"/"olcDatabase={1}monitor.ldif"

Inside this file search the following "cn=manager,dc=my-domain,dc=com" 
and change this into "cn=Manager,dc=example,dc=com"

:wq (save and exit)

Step 6. Now copy the sample database file 
#cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

You need to change owner and group ownership of this Database
#chown -R ldap:ldap /var/lib/ldap/

Now update the database
#updatedb 


Step 7.  Configure OpenLDAP to listen on SSL/TLS 
#vim /etc/sysconfig/ldap 

SLAPD_LDAPS=yes #(default is no)

:wq (save and exit)


Step 8. Now you need to create a certificate for OpenLDAP Server. you can configure CA Server or something else, But in this example, I am creating a self sign certificate. 

# openssl req -new -x509 -nodes -out /etc/pki/tls/certs/example.pem -keyout /etc/pki/tls/certs/examplekey.pem -days 365

Country Name (2 letter code) [XX]:IN
State or Province Name (full name) []:Delhi
Locality Name (eg, city) [Default City]:New Delhi
Organization Name (eg, company) [Default Company Ltd]:Example, Inc.
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your name or your server's hostname) []:ldap.example.com
Email Address []:root@ldap.example.com

Step 9. You need to change owner and group ownership of certificate and keyfile
#chown -Rf root:ldap /etc/pki/tls/certs/example.pem 
#chown -Rf root:ldap /etc/pki/tls/certs/examplekey.pem

You can also check, owner and group ownership changed or not
# ls -l /etc/pki/tls/certs/example*


Step 10. Start/Restart the service of OpenLDAP
# service slapd restart
#chkconfig slapd on

Step 11. Now you need to create base objects in OpenLDAP. 

NOTE: base objects means you have to create dn: for domain name, for OUs, so to creating dn:, you have to defining objectclass. 

there are two ways, (1). you can create it manually (2). you can use migration tools. In this example I am using migration tools. 

#yum install migrationtools 

# cd /usr/share/migrationtools/
# ls

You will see lot of files and scripts here. So you need to change some predefined values according to your domain name, for that do the following:

# vim migrate_common.ph

on the Line Number 61, change "ou=Groups" 
  $NAMINGCONTEXT{'group'}             = "ou=Groups";

 on the Line Number 71, change your domain name 
 $DEFAULT_MAIL_DOMAIN = "example.com";

on the line number 74, change your base name 
$DEFAULT_BASE = "dc=example,dc=com";

on the line number 90, change schema value
$EXTENDED_SCHEMA = 1;

:wq (save and exit)


Now generate a base.ldif file for your Domain, use the following:
#./migrate_base.pl > /root/base.ldif

If you want to migrate your local users and groups on LDAP do the following:
first I am creating 5 local users and groups and then I will migrate to LDAP. 

#mkdir /home/guests
#useradd -d /home/guests/ldapuser1 ldapuser1
#useradd -d /home/guests/ldapuser2 ldapuser2
#useradd -d /home/guests/ldapuser3 ldapuser3
#useradd -d /home/guests/ldapuser4 ldapuser4
#useradd -d /home/guests/ldapuser5 ldapuser5

Now assign the password 
#passwd ldapuser1
#passwd ldapuser2
#passwd ldapuser3
#passwd ldapuser4
#passwd ldapuser5

Now you need to filter out these users from /etc/passwd to another file:
#getent passwd | tail -n 5 > /root/users

Now you need to filter out password information from /etc/shadow to another file:
# getent shadow | tail -n 5 > /root/passwords

Now you need to filter out user groups from /etc/group to another file:
# getent group | tail -n 5 > /root/groups

Now you have to generate ldif file of these filtered out files of users, passwords, and groups

So Open the following file to change the location of password file
# vim migrate_passwd.pl 

Inside this file search /etc/shadow and change it to /root/passwords and then save and exit. 

NOTE: "/etc/shadow" will be available approx the line number of 188. 

Now generate a ldif file for users 
# ./migrate_passwd.pl /root/users > /root/users.ldif

Now Generate a ldif file for groups 
# ./migrate_group.pl /root/groups > /root/groups.ldif

Step 12. Now it' time to upload these ldif file to LDAP Server 

#ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/base.ldif 

# ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/users.ldif

# ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/groups.ldif 

NOTE: It will as a password of "Manager", you have to type the password which you generated in encrypted format. 

Now you can use "ldapsearch" command 

# ldapsearch -x -b "dc=example,dc=com"

Step 13. Now you need to share LDAP Users Home Directories via NFS they can mount the home directory on client machine. 

#vim /etc/exports 

/home/guests    192.168.48.0/255.255.255.0(rw,sync)

:wq (save and exit)

# service nfs restart 
# chkconfig nfs on
# service iptables stop 
# chkconfig iptables off


Step 14. Now you need to copy your LDAP Server certificate in to /var/ftp/pub/. 
# cp -rvf /etc/pki/tls/certs/example.pem /var/ftp/pub/
# ln -s /var/ftp/pub/ /var/www/html/
# service vsftpd restart
# chkconfig vsftpd on
# service httpd restart 
# chkconfig httpd on

Now go to the Client Machine and configure it to use LDAP Server. 

# authconfig-gtk 

Click on "Identity & Authentication" Tab 
Click on drop down menu in "User Account Database" and Select "LDAP"
in LDAP Search Base DN: dc=example,dc=com
in LDAP Server: ldap://ldap.example.com
Select the check Box of "Use TLS to encrypt connections
Click "Download CA Certificate
In Certificate URL: type http://ldap.example.com/pub/example.pem
Click "OK"

# getent passwd ldapuser1

Now Configure your client machine to access the home directory as well 
# vim /etc/auto.master

create the following New Line 
/home/guests    /etc/auto.guests

:wq (save and exit)

# vim /etc/auto.guests
*       -rw     ldap.example.com:/home/guests/&

# service autofs reload

#su - ldapuser1



OpenLDAP Server and Client Configuration finished. So Enjoy............................!







68 comments:

  1. thank you a lot!
    how can I add a new user to ldap?
    (ldapuser6 for example)

    ReplyDelete
    Replies
    1. Hi Dear,
      to add new users on LDAP, do the following
      1. create your users
      2. Now set password for all of the users
      3. Now Filter out your users from /etc/passwd to other file
      4. Now Filter out your Groups from /etc/group to other file
      5. Now Filter out your password information from /etc/shadow to other file
      6. Now use the migrationtools to generate ldif file for users and groups
      "How to use Migrationtools" (See Stel 11).
      7. Now add that users and groups ldif files to LDAP

      Delete
    2. thanx again, another couple of questions:

      1. can you also explain how to delete a users and may be how to implement kerberos

      2. everythings work fine, but passwords don't work. In a video, you change user from a root account, so you don't have to put a password and it's also works for me, but when I'm trying to change from other than root user, I'm getting an error:
      [stas@localhost ~]$ su - ldapuser2
      Password:
      su: incorrect password
      The password is very simple in this case it is just "2" so it can't be mistake,
      can you please help ?


      Delete
    3. Hi,
      To delete a user account from LDAP, use the following command
      #ldapdelete -x -W -D 'cn=Manager,dc=example,dc=com' 'uid=nicholas,ou=Users,dc=example,dc=com'

      in this example, i want to delete a user name "nicholas" so you have to type complete DN of that user.

      I will upload soon "How to configure kerberos with LDAP"

      Now the Answer of your last question, when you filter out your users from /etc/passwd , and filter out the password information from /etc/shadow. have you change your migration script to point your password file, which you filtered here.

      Please see Step 11 and check your step

      Delete
    4. if you don't mind, you can share your e-mail address with me, so that I can send you some notes about LDAP.

      my e-mail ID is sureshchand.rhce@gmail.com

      Delete
    5. of course, I've sent you an email.

      Delete
    6. I'm sure I did it,
      cat root just change to ldapuser password with passwd ?

      Delete
    7. It is also possible for an administrator (or one with write permissions to the userPassword attribute of a given record) to change a password for another user:

      #ldappasswd -x -w secret -D 'cn=Manager,dc=example,dc=com' -s secret 'uid=barbara,ou=Users,dc=example,dc=com'

      In this example, my first "secret" word is the password of "Manager" user and second "secret" word is the password of "barbara" user.

      Delete
  2. Hi Sir, you are great, thank you for your mail and ldap configuration, I have one request if possible could you please help me in configuring postfix using ldap authentication.

    I have one question in LDAP, If I want to change password for user then how can I update in ldap database both as root and normal user.

    Suppose I have a user with name new4 and password is "asd". Now new4 want to change its password. How he can do it so that it can update in ldap database also. and same with root if root want to change password for new4

    ReplyDelete
  3. Hello, use the following command to change password from Manager (root) to ldap user

    #ldappasswd -x -w secret -D 'cn=Manager,dc=example,dc=com' -s secret 'uid=barbara,ou=Users,dc=example,dc=com'

    for the description of this command, read above comments

    if you want the configuration, please give me your mail ID, so that i can send you configuration. if you don't have any problem !!

    ReplyDelete
    Replies
    1. Hi Suresh,
      I am having issue to access LDAP via phpldapadmin
      Please assist me my I'd is farazahmed2005@gmail.com

      Awaiting for your response

      Delete
  4. Hi,your article and video are useful,I did as you told step by step and it works.
    Hope you will update configure kerberos with LDAP soon.

    Pls also send some notes about LDAP to me in your early convinents,thanks.
    howardshaw12@gmail.com

    ReplyDelete
  5. Thanks for your post. Please send me notes about LDAP. My email account is blackperl30@gmail.com.

    Thanks again and please keep posting...

    ReplyDelete
  6. Thanks for your post. So far yours is the most complete walk through that I've seen thus far. Questions:
    1. Do you have instructions on how to add a client via command line without using "authconfig-gtk"? I have some servers that do not have the gui environment installed.

    2. On my ldap server if I do a ldapsearch -x -b "dc=example,dc=com" I get a result. If I do a ldapsearch -x -H "ldaps://ldap.example.com" it does not. "ldap being the hostname".

    3. Also, could you send me your ldap notes.

    Thanks,
    Ed

    ReplyDelete
  7. Suresh Chand bro, really its a great document. Please make another article for Samba Primary Domain Controller .

    ReplyDelete
  8. Hello Suresh,

    Thank You for sharing the information in your Bolg & Youtube.
    Trying to install on Centos 6.
    I've followed your steps everything worked fine.
    At the end when you are trying to configure the authentication method to LDAP in other server providing User Account Configuration & Authentication Configuration.
    In Authentication Configuration, You've selected
    1) Authentication Method: Kerberos Passsword
    2) Realm: KOENIG.COM
    3) Use DNS to locate KDCs for realms is "CHECKED"
    For me it didn't worked.
    Can you please explain me why you have used above 3 steps.


    Please correct me if I've done anything wrong while configuring the above steps.

    ReplyDelete
  9. Hello Suresh,

    Thank you for this very helpful article!

    I have configured my LDAP so far but I encountered the following problem: when LDAP users log in and try to change their own password they always get the following error:

    [ldapuser1@server ~]$ passwd
    Changing password for user ldapuser1.
    passwd: Authentication token manipulation error

    I suppose the issue is triggered by olcDatabase={0}config.ldif or olcDatabase={1}monitor.ldif. How are the ACLs in there supposed to look like?

    I would appreciate your help, thank you in advance!

    Atanas

    ReplyDelete
    Replies
    1. Hi Atanas Yankov
      you can't change password of ldapuser using 'passwd' command. Please use the following command

      #ldappasswd -x -w redhat -D 'cn=Manager,dc=example,dc=com' -s password 'uid=ldapuser1,ou=People,dc=example,dc=com'

      Delete
  10. hello bro how to conncet windows machine to Ldap users

    ReplyDelete
  11. how can I add a new user to ldap? ...step by step note please

    ReplyDelete
    Replies
    1. Add user:-

      # useradd -d /home/guests/ldapuser6 ldapuser

      # passwd ldapuser6

      # getent passwd | tail -n 1 > /root/user

      # getent shadow | tail -n 1 > /root/passwords

      # getent group | tail -n 1 > /root/groups

      # ./migrate_passwd.pl /root/users > /root/users.ldif

      # ./migrate_group.pl /root/groups > /root/groups.ldif



      #ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/base.ldif

      # ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/users.ldif

      # ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/groups.ldif


      # ldapsearch -x -b "dc=example,dc=com"

      Delete
  12. Hi Suresh Chandra,
    This topic is very useful. i got some error while installing this server.

    <= str2entry: str2ad(olcTLSCertificatKeyFile): attribute type undefined
    slaptest: bad configuration file!
    Pls help me out. I fallowed as it is steps.
    Thanks In Advance.
    Ganesh.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. Hi Suresh, Thanks for the uploading. I follwed you are step by step serverside is everyting is ok In my client part I configured ldap authentication, certificate and everythings ok. but when I give "getent passwd ldapuser1" its not showing anything. pls tell me where I need to check?

    /etc/nsswitch.conf, file i addedd like "passwd: files ldap group: files ldap shadow: files ldap" also same problem Suresh please guide me

    ReplyDelete
  15. How can i take openldap server backup in centos and also how can i recover ldap server from the old server bakcup to have all the objects.

    Please guide me.

    ReplyDelete
  16. hi admin.
    I have a diagram : Windows Domain (Windows Server 2012 ) and OpenLDAP (Centos 6.5)
    How to sync username/passwd from Windows Domain to OpenLDAP ?
    Please help me.
    Thanks ... !

    ReplyDelete
  17. Hello suresh.I followed the steps you provided but on the client side when I did "getent passwd ldapuser1" it did not return anything.

    Could you sort out the problem.

    Thanks

    ReplyDelete
  18. I am also facing the same problem as KmSitlhou and venkat d. Please suggest the solution and reason.

    ReplyDelete
    Replies
    1. The above issue is resolved however now when I login with ldapuser on client message, it is successful with an error message "id: cannot find group name for id xxx".

      Delete
  19. LDAP Online Training, ONLINE TRAINING – IT SUPPORT – CORPORATE TRAINING http://www.21cssindia.com/courses/ldap-online-training-103.html The 21st Century Software Solutions of India offers one of the Largest conglomerations of Software Training, IT Support, Corporate Training institute in India - +919000444287 - +917386622889 - Visakhapatnam,Hyderabad LDAP Online Training, LDAP Training, LDAP, LDAP Online Training| LDAP Training| LDAP| Courses at 21st Century Software Solutions
    Talend Online Training -Hyperion Online Training - IBM Unica Online Training - Siteminder Online Training - SharePoint Online Training - Informatica Online Training - SalesForce Online Training - Many more… | Call Us +917386622889 - +919000444287 - contact@21cssindia.com
    Visit: http://www.21cssindia.com/courses.html

    ReplyDelete
  20. Hi Suresh Chand ,
    Its great topic and very useful . I configured ldap with same steps and ldapuser1 successfuly login whenever we login as (switch Usur ) su - ldapuser1 but i am not able to login ldapuser1 whenever i try to login into other terminal .
    example :-
    [root@server1~]su - ldapuser1 ---> its login
    but
    if I open other tty
    login:ldapuser1
    password: --------------
    login incorrect

    ReplyDelete
    Replies
    1. Hi Chandra,

      Hope you are doing great, actually i have seen your post about open ldap installation etc. Am impressed your way to deal it.

      Actually, am installing on red hat servers, below is the server version:
      1. cat /etc/redhat-release
      Red Hat Enterprise Linux Server release 6.3 (Santiago)
      2. uname -a
      Linux sl007358 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
      3. uname -i
      x86_64

      4. As you can see, i have done the work till the slapd process starts, you can see below:

      ps -ef | grep slapd
      X 0 XXpts/0 00:00:00 grep slapd
      /usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap
      /opt/ldap/server7/lib/64/ns-slapd -D /opt/ldap/server7/var/dcc/ads -i /opt/ldap/server7/var/dcc/ads/logs/pid

      But am going to migrate the tool, form " yum install migratetools -y"
      Its not installing.

      Could please help me in this, so that i can migaate tool, then my change would be install phpmyadmin tool.


      You can find errors below:
      .
      $yum install migrationtools
      Error: Package: migrationtools-47-7.el6.noarch (clone-prd-rhel-x86_64-server-6)
      Requires: /usr/share/migrationtools/migrate_common.ph


      "migrate_common.ph" script is very important to install for my data migration. Then only i can install my php Open-ldap admin guide.If any one having any idea, please let me know. Even suggest on this topic.
      Is there anyway other way or manual way to do the same.

      Please let me know if you have any question on my points.

      Delete
  21. i creted ldap users. now i want to share some directories to each ldap users with different permissions from server. how will i do that?

    ReplyDelete

  22. After step 12 in LDAP server configuration, which password should i give ???
    do we need to give that encrypted passwd that we generate earlier....it is very hard to copy without GUI...i am using TUI...Please help

    ReplyDelete
  23. my ldap server working properlly.but i cant login into ldapusers from client with logon screen.but i can login in root account in client side side..why?

    ReplyDelete
  24. OpenLDAP --- "
    OpenLDAP Online Training
    Send ur Enquiry to contact@21cssindia.com
    Openldap
    What is Openldap?
    Acronyms
    LDIF
    Schema" more… Online Training- Corporate Training- IT Support U Can Reach Us On +917386622889 - +919000444287 http://www.21cssindia.com/courses/open-ldap-online-training-255.html

    ReplyDelete
  25. Hi, Getting below error while creating ssl certificate.
    I have same configuraion as mentioned by u.
    # openssl req -new -x509 -out /etc/pki/tls/certs/example.pem - keyout /etc/pki/tls/certs/examplekey.pem -days 365
    Error is :

    unknown option -
    req [options] outfile
    where options are

    ReplyDelete
    Replies
    1. please use this had forget -nodes


      openssl req -new -x509 -nodes -out /etc/pki/tls/certs/example.pem - keyout /etc/pki/tls/certs/examplekey.pem -days 365

      Delete
  26. Hi, Getting below error when I start slapd service.
    [root@centos]# service slapd restart
    Stopping slapd: [FAILED]
    Checking configuration files for slapd: [FAILED]
    <= str2entry: str2ad(olcTLSCertifiacteFile): attribute type undefined
    slaptest: bad configuration file!

    Tried all possibilities.Please help.

    ReplyDelete
  27. how can we test this LDAP features

    ReplyDelete
  28. Suresh,

    Could you publish the same configuration for RHEL 7 / Centos 7 deployment ?

    ReplyDelete
  29. Thank you Suresh sir, the entire procedure was really helpfull. But I came across a problem while executing the command on client machine "su - ldapuser1". The error was "su: user ldapuser1 does not exist". Please provide me solution for this. Thank you in advance.

    ReplyDelete
  30. Hi Chandra,

    Hope you are doing great, actually i have seen your post about open ldap installation etc. Am impressed your way to deal it.

    Actually, am installing on red hat servers, below is the server version:
    1. cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 6.3 (Santiago)
    2. uname -a
    Linux sl007358 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
    3. uname -i
    x86_64

    4. As you can see, i have done the work till the slapd process starts, you can see below:

    ps -ef | grep slapd
    X 0 XXpts/0 00:00:00 grep slapd
    /usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap
    /opt/ldap/server7/lib/64/ns-slapd -D /opt/ldap/server7/var/dcc/ads -i /opt/ldap/server7/var/dcc/ads/logs/pid

    But am going to migrate the tool, form " yum install migratetools -y"
    Its not installing.

    Could please help me in this, so that i can migaate tool, then my change would be install phpmyadmin tool.


    You can find errors below:
    .
    $yum install migrationtools
    Error: Package: migrationtools-47-7.el6.noarch (clone-prd-rhel-x86_64-server-6)
    Requires: /usr/share/migrationtools/migrate_common.ph


    "migrate_common.ph" script is very important to install for my data migration. Then only i can install my php Open-ldap admin guide.If any one having any idea, please let me know. Even suggest on this topic.
    Is there anyway other way or manual way to do the same.

    Please let me know if you have any question on my points.

    ReplyDelete
  31. Guys, I am follow all the step but when i run "ldapadd -x -D cn=Manager,dc=server.example.com,dc=com -W -f ldapuser.ldif" command error show "ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)" Please Help me out asap.

    ReplyDelete
  32. Is this document applicable for CentOS 7? I have tried so many times but did not work. Later i came to know there is a bug in CentOS 7 & that is the reason that it didn't work. Could you please confirm these?

    ReplyDelete
  33. very useful document.

    can you help me to configure the iptables without stopping it.

    Thanks,
    Teja

    ReplyDelete
  34. Hi suresh chandra,

    Thank you very much for this LDAP server and client configuration post, It worked for me, I am really very happy that i gone through this post and implemented it,Now i can say that i know how to configure LDAP server and Client.

    One suggestion: i was getting below errors , it would be very good if you can cover general errors and answeres to them.

    ReplyDelete
  35. Hi Suresh,

    LDAP login works via terminal, but doesn't work via GUI. Can you give me some work around steps?

    regards, chetan

    ReplyDelete
  36. I am amit kumar. I just install and configure LDAP server with help your blogs.I have some confusion to client side setting,you are also not explain and configure ldap client side. so please explain client side configure on your blogs. If possible send me LDAP documents.

    my mail Id:- amityouk@gmail.com

    ReplyDelete
  37. getent passwd ldapuser1
    not showing user details on client side

    ReplyDelete
  38. I logged in as ldapuser1. But not able to create dir/file.

    ReplyDelete
  39. Thanks for the steps. I got below when execute ldapadd
    ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /root/base.ldif
    Enter LDAP Password:
    ldap_bind: Invalid credentials (49)

    I have pasted the encrypted password which I got using slapassword. Please help me

    ReplyDelete
  40. new ldap user data is fetch on client side and error is user does not exist

    ReplyDelete
  41. Hi Suresh,

    I am having configured an open dap server and DNS,DHCPD and generate a CA certified root certificate for a ldapuser, actually my prior motto is to get a ldap user authenticated in iDRAC page (a dell remoteserver management utility eventhough I configured all the servicesss still it faile while trying to connect 192.168.1.3:636 ssl port no which I have configured for ssl authentication.)

    ReplyDelete
  42. Sir i am not getting the directory "openldap-server" in /usr/shar then how can i get the file DB_CONFIG.example also not any file like DB_CONFIG in /var/lib/ldap

    Step 6. Now copy the sample database file
    #cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG


    So please resolve my issu.

    ReplyDelete
  43. Thanks for your grate tutorials and work.

    I have tried your steps, in client said I getting some issue :
    ldapsearch working fine, but getent passwd 'user' returns nothing on Centos 6.5 (client side)

    Kindly give me a solution.

    ReplyDelete
  44. I have solved my issue. now working fine thank for grate tutorial.

    ReplyDelete
  45. how can i set kerberos principal for particular user

    ReplyDelete
  46. Outstanding tutorials.. thank you so much for taking the time to share your knowledge.

    ReplyDelete
  47. Hello,

    I want to give root permission to ldapuser, how ...?
    Please let me know .

    ReplyDelete
  48. Hi Suresh,

    We have set LDAP using your tutorial and have configured LAM for GUI . But it is hectic for us to keep changing password in GUI so tried below command to change password but getting below error please advice


    [root@ldap admin]# ldappasswd -H ldap://192.168.0.66 -x -D "cn=MCB170001167,ou=People,dc=mobiuscjb,dc=in" -w Mobius365 -a Mobius365 -s Mobius@123
    Result: Insufficient access (50)

    ReplyDelete
  49. i want allow client side user to change his password

    ReplyDelete
  50. Any idea why this is not working? I looks like the command works.

    [root@redhat6x64 ~]# ldapadd -x -W -D "cn=ldap,dc=example,dc=com" -f /root/base.ldif
    Enter LDAP Password:
    ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

    Thank you for any help
    Ricardo

    ReplyDelete
  51. This comment has been removed by the author.

    ReplyDelete
  52. Exclusive information. Thanks for sharing with us.

    OrangeHRM LDAP Integeration Module

    ReplyDelete
  53. I am getting this error on logging in to the ldapuser from the client

    Could not chdir to home directory /home/guests/ldapuser1: No such file or directory
    -bash-4.1$

    ReplyDelete
  54. Hi Suresh,

    thanks for this well defined document, i have one question related to LDAP
    1) logs related to LDAP where i can find?
    2) my LDAP database seems corrupted i need to check in the logs.

    can you please guide me about this?

    br
    Prahalada HC.

    ReplyDelete