Chapter 11. Cloning open source virtual servers 187
olcMonitoring: TRUE
olcDbDirectory: /var/lib/ldap
...
4. Save the file. Your LDAP server should now be minimally configured.
Start the LDAP service
To start the LDAP server, perform the following steps:
1. Start LDAP at boot time by running the chkconfig command and, for this session, using
the service command:
# chkconfig slapd on
# service slapd start
Starting slapd: [ OK ]
2. Query the LDAP database with the ldapsearch command. The -x flag specifies that simple
authentication is used:
# ldapsearch -x
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# search result
search: 2
result: 32 No such object
The result shows that the LDAP directory can be searched, but that it is empty. This is
expected, as no data has been added to it.
11.2.3 Adding an LDAP user
When the golden image was installed, it was recommended that a non-root user ID be added.
In this example, it was named mikemac.
To add an LDAP user, perform the following steps:
1. Choose an LDAP user name. In this example, mikemac will be used. Verify that there is
no such local user by running the id command:
# id mikemac
id: mikemac: No such user
2. An LDIF (LDAP Interchange Format) file is created to add an organizational unit named
People and a user ID named mikemac. Create a similar file for your system’s values.
# cd /tmp
# vi initial.ldif // create the input file ...
dn: dc=my-domain,dc=com
objectClass: dcObject
objectClass: organization
description: my-domain domain
o: my-domain
dc: my-domain
Commenti su questo manuale