Ubuntu Server 15.10

# apt-get install slapd ldap-utils

# slaptest

config file testing succeeded
$ systemctl status slapd
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
   Loaded: loaded (/etc/init.d/slapd)
   Active: active (running) since Fri 2016-01-15 08:48:55 JST; 4min 28s ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/slapd.service
           └─4674 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openld...

Jan 15 08:48:52 cdea022 systemd[1]: Starting LSB: OpenLDAP standalone serve.....
Jan 15 08:48:52 cdea022 slapd[4665]: * Starting OpenLDAP slapd
Jan 15 08:48:53 cdea022 slapd[4669]: @(#) $OpenLDAP: slapd  (Ubuntu) (Sep 1... $
                                             buildd@lgw01-05:/build/openlda...pd
Jan 15 08:48:55 cdea022 slapd[4674]: slapd starting
Jan 15 08:48:55 cdea022 slapd[4665]: ...done.
Jan 15 08:48:55 cdea022 systemd[1]: Started LSB: OpenLDAP standalone server...).
Hint: Some lines were ellipsized, use -l to show in full.
	
$ ldapsearch -H ldap://localhost -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts 
#

#
dn:
namingContexts: dc=nodomain

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
	
# slapcat
dn: dc=nodomain
objectClass: top
objectClass: dcObject
objectClass: organization
o: nodomain
dc: nodomain
structuralObjectClass: organization
entryUUID: 1c272b02-4f65-1035-94f9-dde91a847de7
creatorsName: cn=admin,dc=nodomain
createTimestamp: 20160114234852Z
entryCSN: 20160114234852.328428Z#000000#000#000000
modifiersName: cn=admin,dc=nodomain
modifyTimestamp: 20160114234852Z

dn: cn=admin,dc=nodomain
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e1NTSEF9QTR3ZDBmeFNLYkxwYkNKT2xpUjExbW9wcnRQM0k4KzI=
structuralObjectClass: organizationalRole
entryUUID: 1c2def96-4f65-1035-94fa-dde91a847de7
creatorsName: cn=admin,dc=nodomain
createTimestamp: 20160114234852Z
entryCSN: 20160114234852.372842Z#000000#000#000000
modifiersName: cn=admin,dc=nodomain
modifyTimestamp: 20160114234852Z
	
# dpkg-reconfigure slapd

# ldapsearch -x

# extended LDIF
#
# LDAPv3
# base  (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# eg.jp.honda.com
dn: dc=eg,dc=jp,dc=honda,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: egj
dc: eg

# admin, eg.jp.honda.com
dn: cn=admin,dc=eg,dc=jp,dc=honda,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2
	

# apt-get install phpldapadmin
# cd /var/www

# ln -s /usr/share/phpldapadmin .

	dc=example,dc=com
	This base cannot be created with PLA.
	
/etc/phpldapadmin/config.php

$servers->setValue('server','base',array('dc=ramuda,dc=co,dc=jp'));

$servers->setValue('login','bind_id','cn=xxxxxx,dc=ramuda,dc=co,dc=jp');


ldifの例
ex01.ldif

ex02.ldif

ex03.ldif

ex04.ldif

john.ldif

mary.ldif

tom.ldif


Return

Jan/21/2016 AM 08:15