Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
LDAP Implementation at Deshwal
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Referance Link : https://www.server-world.info/en/note?os=CentOS_Stream_9&p=openldap&f=1 OS - Centos 9 Stream or RHEL 9 [[install from EPEL]] dnf --enablerepo=epel -y install openldap-servers openldap-clients systemctl enable --now slapd systemctl restart slapd [[Set OpenLDAP admin password. ]] slappasswd New password: Re-enter new password: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx [root]# vi chrootpw.ldif # specify the password generated above for [olcRootPW] section dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx [root]# ldapadd -Y EXTERNAL -H ldapi:/// -f chrootpw.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={0}config,cn=config" [[Import basic Schemas. ]] [root]# 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@dlp ~]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 adding new entry "cn=nis,cn=schema,cn=config" [root@dlp ~]# 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" [[Set your domain name on LDAP DB]] # generate directory manager's password [root@dlp ~]# slappasswd New password: Re-enter new password: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx [root@ldap ~]# vi chdomain.ldif # replace to your own domain name for [dc=***,dc=***] section # specify the password generated above for [olcRootPW] section dn: olcDatabase={1}monitor,cn=config changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=bluemonk,dc=com" read by * none dn: olcDatabase={2}mdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=bluemonk,dc=com dn: olcDatabase={2}mdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=Manager,dc=bluemonk,dc=com dn: olcDatabase={2}mdb,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}0eQj3z0tjTCkz4Elh4X61hlJ3lkqhS8V dn: olcDatabase={2}mdb,cn=config changetype: modify add: olcAccess olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=bluemonk,dc=com" write by anonymous auth by self write by * none olcAccess: {1}to dn.base="" by * read olcAccess: {2}to * by dn="cn=Manager,dc=bluemonk,dc=com" write by * read [root@dlp ~]# ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={1}monitor,cn=config" modifying entry "olcDatabase={2}mdb,cn=config" modifying entry "olcDatabase={2}mdb,cn=config" modifying entry "olcDatabase={2}mdb,cn=config" modifying entry "olcDatabase={2}mdb,cn=config" [[Add Base OUs]] [root@ldap ~]# vi base.ldif dn: dc=bluemonk,dc=com objectClass: top objectClass: domain dc: bluemonk dn: ou=PROTAIGA GLOBAL,dc=bluemonk,dc=com objectClass: organizationalUnit ou: PROTAIGA GLOBAL dn: ou=Bluemonk Ventures,dc=bluemonk,dc=com objectClass: organizationalUnit ou: Bluemonk Ventures dn: ou=Deshwal,dc=bluemonk,dc=com objectClass: organizationalUnit ou: Deshwal dn: ou=devit,dc=bluemonk,dc=com objectClass: organizationalUnit ou: devit dn: ou=oxypc,dc=bluemonk,dc=com objectClass: organizationalUnit ou: oxypc dn: ou=customers,dc=bluemonk,dc=com objectClass: organizationalUnit ou: customers dn: cn=Manager,dc=bluemonk,dc=com objectClass: organizationalRole cn: Manager description: LDAP Administrator [root@ldap ~]# ldapadd -x -D cn=Manager,dc=bluemonk,dc=com -W -f base.ldif Enter LDAP Password: adding new entry "dc=bluemonk,dc=com" adding new entry "ou=PROTAIGA GLOBAL,dc=bluemonk,dc=com" adding new entry "ou=Bluemonk Ventures,dc=bluemonk,dc=com" adding new entry "ou=Deshwal,dc=bluemonk,dc=com" adding new entry "ou=devit,dc=bluemonk,dc=com" adding new entry "ou=oxypc,dc=bluemonk,dc=com" adding new entry "ou=customers,dc=bluemonk,dc=com" adding new entry "cn=Manager,dc=bluemonk,dc=com" [[Add User with Right Attributes]] [root@ldap ~]# vi user.ldif dn: uid=jsmith,ou=PROTAIGA GLOBAL,dc=bluemonk,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson uid: jsmith cn: John Smith sn: Smith employeeNumber: 1001 mail: jsmith@bluemonk.com mobile: +1 555-123-4567 title: Software Engineer departmentNumber: IT l: New York manager: uid=mbrown,ou=PROTAIGA GLOBAL,dc=bluemonk,dc=com userPassword: {SSHA}6eGKqoklEjwwi6HABhmbbY1OaBi39cIG [root@ldap ~]# ldapadd -x -D cn=Manager,dc=bluemonk,dc=com -W -f user.ldif Enter LDAP Password: adding new entry "uid=jsmith,ou=PROTAIGA GLOBAL,dc=bluemonk,dc=com"
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)