Cara install OpenLDAP
OS: GNU/Linux Debian 9.6
Hostname: instance-1
IP: 104.148.0.1
Hosts:
/etc/hosts
104.148.0.1 luxskill.net instance-1
Install: slapd ldap-utils
Edit:
root@instance-1:~# cat /etc/ldap/ldap.conf
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
BASE dc=luxskill,dc=net
URI ldap://luxskill.net ldap://luxskill.net:666
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
# TLS certificates (needed for GnuTLS)
#TLS_CACERT /etc/ssl/certs/ca-certificates.crt
root@instance-1:~# vi base.ldif
# create new
# change to your own suffix for the field [dc=luxskill,dc=net]
dn: ou=itnsa,dc=luxskill,dc=net
objectClass: organizationalUnit
ou: itnsa
root@instance-1:~# ldapadd -x -D cn=admin,dc=luxskill,dc=net -W -f base.ldif
Check:
root@instance-1:~# slapcat
root@instance-1:~# ldapsearch -x -W -D "cn=admin,dc=luxskill,dc=net" -b "dc=luxskill,dc=net"
Hostname: instance-1
IP: 104.148.0.1
Hosts:
/etc/hosts
104.148.0.1 luxskill.net instance-1
Install: slapd ldap-utils
Edit:
root@instance-1:~# cat /etc/ldap/ldap.conf
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
BASE dc=luxskill,dc=net
URI ldap://luxskill.net ldap://luxskill.net:666
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
# TLS certificates (needed for GnuTLS)
#TLS_CACERT /etc/ssl/certs/ca-certificates.crt
root@instance-1:~# vi base.ldif
# create new
# change to your own suffix for the field [dc=luxskill,dc=net]
dn: ou=itnsa,dc=luxskill,dc=net
objectClass: organizationalUnit
ou: itnsa
root@instance-1:~# ldapadd -x -D cn=admin,dc=luxskill,dc=net -W -f base.ldif
Check:
root@instance-1:~# slapcat
root@instance-1:~# ldapsearch -x -W -D "cn=admin,dc=luxskill,dc=net" -b "dc=luxskill,dc=net"
Komentar