HP OSMS Blueprint: Directory Services on HP ProLiant Servers with SLES10

dn: dc=example,dc=com
objectClass: dcObject
objectClass: organization
dc: example
o: example
dn: dc=osm,dc=example,dc=com
objectClass: dcObject
objectClass: organizationalUnit
dc: osm
ou: osm
dn: uid=tomy,dc=osm,dc=example,dc=com
objectClass: inetOrgPerson
uid: tomy
sn: tom
cn: tom yan
mail: tom.yan@example.com
carLicense: sea4321
userPassword: tom
NOTE: If there are any trailing spaces in the LDIF file, the ldapadd command fails.
2. Enter the following command to add the entry to the directory:
# /opt/symas/bin/ldapadd x D cn=Manager,dc=example,dc=com\
W f /tmp/add.ldif
Figure 2 Adding the Entries
NOTE: For the commands listed in this and proceeding sections, the following options are
used:
-D specifies the Distinguished Name (DN) that is bound to the LDAP directory.
-x specifies simple authentication.
-W specifies a prompt for the bind password (for simple authentication).
-f specifies read operations from a file.
-b specifies the base DN as the starting point for the search.
-s specifies the scope of the search. The search can be base, one or sub to specify a base object, or
one-level or a subtree search.
For additional information, see the ldap man page.
Searching for an Entry in the Directory
To search for the new entry you added in the previous step, use the ldapsearch command as
follows:
# /opt/symas/bin/ldapsearch -x -D "cn=Manager,dc=example,dc=com" W \
"cn=tom yan"
Managing the Symas CDS Server 13