When the installation is complete, we actually need to reconfigure the LDAP package. Type the following to bring up the package configuration tool:
sudo dpkg-reconfigure slapd
You will be asked a series of questions about how you‘d like to configure the software.
Omit OpenLDAP server configuration? No
DNS domain name?
Organization name?
Administrator password?
Database backend to use? HDB
Remove the database when slapd is purged? No
Move old database? Yes
Allow LDAPv2 protocol? No
The ldap-utils package comes with enough utilities to manage the directory but the long string of options needed can make them a burden to use. The ldapscripts package contains wrapper scripts to these utilities that some people find easier to use.
Install the package:
sudo apt-get install ldapscripts
#################################################
then add two nodes ou=Groups and ou=Users to the LDAP, before add a group to LDAP
a stupid bug:
if the passwd contain some special character like"@",","....anything like that, then you will get error when add group use ‘sudo ldapaddgroup test‘,like:
error adding group to ldap
so,give it a simple ‘secret‘ passwd, like ‘dog‘,‘monkey‘,,,,
############################################################################################## step by step :
first:
second:
sudo dpkg-reconfigure lapd #configure according to the link2 above, you‘d better don‘t configure it by hand.
sudo apt-get install ldapscripts #install a convenient tools
and then, configure ldapscripts‘s configure file /etc/ldapscripts/ldapscripts.conf, add sentences, like:
SERVER=localhost
BINDDN=‘cn=admin,dc=example,dc=com‘
BINDPWDFILE=‘/etc/ldapscripts/ldapscripts.passwd‘
SUFFIX=‘dc=example,dc=com‘
GSUFFIX=‘ou=Groups‘
USUFFIX=‘ou=Users‘
fourth:
add passwd to ldapscripts.passwd file :
sudo sh -c "echo -n ‘monkey‘ > /etc/ldapscripts/ldapscripts.passwd"
then: you can operate LDAP using ldapscripts commands according to link 1.
warning: ldapscript will always return ‘error adding group qa to LDAP‘,if the group already exists
http://www.meso.northwestern.edu/intranet/recipies/useful-computer-files-and-programs/configuring-group-linux-servers-and-terminals-with-ldap-kerberos-and-nfs/ldap-user-and-group-management
start LDAP server: /etc/init.d/lsapd
LDAP 在ubuntu14.04下的安装配置install and configure
原文:http://www.cnblogs.com/kungfupanda/p/4704439.html