openLDAP server installation and configuration step by step – RHEL7

ARK

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

You may also like...

15 Responses

  1. deepak says:

    Hai ankit,

    Can you please share ldap server with phpldapadmin(GUI).i am looking for it.

  2. XU ZHI says:

    Hi Ravi,

    Thanks for sharing this one, I use the exact same configuration as yours except the password. But when I follow your post, I get a error when adding the ldap base.

    [root@CentOS7-Server ~]# ldapadd -x -W -D “cn=Manager,dc=arkit,dc=co.in” -f /root/base.ldif
    Enter LDAP Password:
    ldapadd: attributeDescription “dn”: (possible missing newline after line 9, entry “dc=arkit,dc=co.in”?)
    ldapadd: attributeDescription “dn”: (possible missing newline after line 10, entry “dc=arkit,dc=co.in”?)
    ldapadd: attributeDescription “dn”: (possible missing newline after line 11, entry “dc=arkit,dc=co.in”?)
    adding new entry “dc=arkit,dc=co.in”
    ldap_add: Type or value exists (20)
    additional info: objectClass: value #4 provided more than once

  3. hi thanks for share this one ,
    i need to know how to update new ldap user entry

  4. rakesh jain says:

    i have followed it line by line on RHEl 7.

    Its throwing an error –

    [root@classroom cn=config]# ldapadd -x -W -D “cn=Manager,dc=example,dc=com” -f /root/users.ldif
    Enter LDAP Password:
    adding new entry “uid=ldapuser1,ou=People,dc=example,dc=com”
    ldap_add: Invalid syntax (21)
    additional info: objectClass: value #3 invalid per syntax

  5. rakesh jain says:

    have added these schemas as well –

    [root@classroom Downloads]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
    SASL/EXTERNAL authentication started
    SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
    SASL SSF: 0
    adding new entry “cn=cosine,cn=schema,cn=config”

    [root@classroom Downloads]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
    SASL/EXTERNAL authentication started
    SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
    SASL SSF: 0
    adding new entry “cn=inetorgperson,cn=schema,cn=config”

  6. rakesh jain says:

    users.ldif file –

    [root@classroom cn=config]# cat /root/users.ldif
    dn: uid=ldapuser1,ou=People,dc=example,dc=com
    uid: ldapuser1
    cn: ldapuser1
    sn: ldapuser1
    mail: ldapuser1@example.com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: posixAccount
    objectClass: top
    objectClass: shadowAccount
    userPassword: {crypt}$6$zFN1p/46$k3ltZs9w.RZ2nsofnI/JrV2HGrHMDR.aNgztLhYmlXrGuK.a2hBQZ4bFY/c9wthzrO2nm1h.X1LYj4IsOXY8U.
    shadowLastChange: 17080
    shadowMin: 0
    shadowMax: 99999
    shadowWarning: 7
    loginShell: /bin/bash
    uidNumber: 1001
    gidNumber: 1001
    homeDirectory: /home/ldapuser1

  7. rakesh jain says:

    Resolved it .. Plz modify your tutorial and mention that we need to add all the 3 schemas –

    [root@classroom Downloads]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
    [root@classroom Downloads]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
    [root@classroom Downloads]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif

    Thanks!!

  8. Govind says:

    Hi Ravi , these steps also works on centos 7

  9. govind says:

    on client no output for the command getent passwd ldapuser1, I followed the same steps as mentioned in the document

  10. govind says:

    Thanks for your post. LDAP server configuration done. How to add new users on ldap server to existing server. I have little bit problem in adding. let me know if any step by step procedure

Leave a Reply