Internet Express for Tru64 UNIX Version 6.8 Administration Guide (14233)

Note:
Whenever you enable or disable the LDAP Module for System Authentication, you must reboot
the system. Otherwise, some applications (such as cron and Advanced Server for UNIX) will
not detect the change in authentication method.
4.5 Maintaining the LDAP Directory Server Using LDAP Commands
You can use LDAP commands (instead of the LDAP utilities supplied with Internet Express) to
formulate different queries than those provided by the Internet Express LDAP utilities. The
following sections describe how to use these commands to add and modify LDAP entries.
4.5.1 Adding Entries to an LDAP Database
To modify an entry in an existing LDAP database, you can use the ldapmodify command. In
the following example, the ldapmodify command is reading from standard input:
# /usr/internet/ldap_sdk/tools/ldapmodify -w admin \
-D "cn=root, o=HP Engineering, c=US"
dn: cn=Joseph Shmoe, o=HP Engineering, c=US
changetype: modify
replace: title
title: Process Engineer
-
^D
modifying entry cn=Joseph Shmoe, o=HP Engineering, c=US
You can use the ldapsearch command to retrieve the modified entry:
# /usr/local/bin/ldapsearch -b 'o=HP Engineering, c=US' 'cn=Joe Shmoe'
cn=Joseph Shmoe, o=HP Engineering, c=US
objectclass=person
cn=Joseph Shmoe
cn=Joe Shmoe
sn=Shmoe
givenname=Joseph
mail=shmoe@fac.digieng.com
uid=jshmoe
title=Process Engineer
For more information, see ldapmodify(1).
4.5.2 Modifying Entries in an LDAP Database
To modify an entry in an existing LDAP database, you can use the ldapmodify command. In
the following example, the ldapmodify command is reading from standard input:
# /usr/internet/ldap_sdk/tools/ldapmodify -w admin \
-D "cn=root, o=HP Engineering, c=US"
dn: cn=Joseph Shmoe, o=HP Engineering, c=US
changetype: modify
replace: title
title: Process Engineer
-
^D
modifying entry cn=Joseph Shmoe, o=HP Engineering, c=US
You can use the ldapsearch command to retrieve the modified entry:
# /usr/local/bin/ldapsearch -b 'o=HP Engineering, c=US' 'cn=Joe Shmoe'
cn=Joseph Shmoe, o=HP Engineering, c=US
objectclass=person
cn=Joseph Shmoe
cn=Joe Shmoe
sn=Shmoe
givenname=Joseph
90 User Authentication