OpenLDAP initial setup on OpenBSD
Wednesday, May 5, 2010 1:23:16 PM
1) add package repo
# export PKG_PATH=ftp://ftp.tw.openbsd.org/pub/OpenBSD/4.6/packages/i386/
2) install opeldap client & server
# pkg_add -rv openldap-client
# pkg_add -rv openldap-server
3) Below is the post-installation note of openldap-server
--- openldap-server-2.3.43 -------------------
To start slapd, configure it in /etc/openldap/slapd.conf then add
the following line to /etc/rc.conf.local:
slapd_flags="-u _openldap"
and to /etc/rc.local (be sure to start it _before_ any daemon that may
need it):
if [ "$slapd_flags" != "NO" -a -x /usr/local/libexec/slapd ]; then
install -d -o _openldap /var/run/openldap
/usr/local/libexec/slapd $slapd_flags
echo -n ' slapd'
fi
4) Modify the values of /etc/openldap/slapd.conf
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
5) Fireup openldap-server!!
# /usr/local/libexec/slapd
6) add initial entries (be sure to trim any leading and trailing whitespace!!)
# vi example.ldif
dn: dc=example,dc=com
objectclass: dcObject
objectclass: organization
o: Example Company
dc: example
dn: cn=Manager,dc=example,dc=com
objectclass: organizationalRole
cn: Manager
7) Import the LDIF, rootpw is 'secret'
# ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif
8) Enjoy!! You can browse the ldap database via luma (ex. ubuntu)
# sudo apt-get install luma
=> edit the server list, bind with anonymous, and browse
REFERENCE: OpenLDAP, A Quick-Start Guide
http://www.openldap.org/doc/admin24/quickstart.html
# export PKG_PATH=ftp://ftp.tw.openbsd.org/pub/OpenBSD/4.6/packages/i386/
2) install opeldap client & server
# pkg_add -rv openldap-client
# pkg_add -rv openldap-server
3) Below is the post-installation note of openldap-server
--- openldap-server-2.3.43 -------------------
To start slapd, configure it in /etc/openldap/slapd.conf then add
the following line to /etc/rc.conf.local:
slapd_flags="-u _openldap"
and to /etc/rc.local (be sure to start it _before_ any daemon that may
need it):
if [ "$slapd_flags" != "NO" -a -x /usr/local/libexec/slapd ]; then
install -d -o _openldap /var/run/openldap
/usr/local/libexec/slapd $slapd_flags
echo -n ' slapd'
fi
4) Modify the values of /etc/openldap/slapd.conf
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
5) Fireup openldap-server!!
# /usr/local/libexec/slapd
6) add initial entries (be sure to trim any leading and trailing whitespace!!)
# vi example.ldif
dn: dc=example,dc=com
objectclass: dcObject
objectclass: organization
o: Example Company
dc: example
dn: cn=Manager,dc=example,dc=com
objectclass: organizationalRole
cn: Manager
7) Import the LDIF, rootpw is 'secret'
# ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif
8) Enjoy!! You can browse the ldap database via luma (ex. ubuntu)
# sudo apt-get install luma
=> edit the server list, bind with anonymous, and browse

REFERENCE: OpenLDAP, A Quick-Start Guide
http://www.openldap.org/doc/admin24/quickstart.html






