LDAP-UX Client Services B.04.15 with Microsoft Windows Active Directory Server Administrator's Guide (edition 8)

Table Of Contents
Discover search filter, search base or search scope for a particular name service.
Discover the attribute mapping information for a specified name service.
Discover the list of available template files for a specific name service when you want
to add a new user or group entry to an LDAP directory server.
Discover LDAP-UX configuration information about required attributes when creating
a new user or group entry.
Discover the recommended list of attributes that an interactive management tool can
consider making available for modification for the specified entry.
The following subsequent sections provide examples on how to use ldapuglist, ldapugadd,
ldapugmod, ldapugdel and ldapcfinfo to display, enumerate, add, modify or delete user
accounts and groups in an LDAP directory server.
Listing Users
You can use ldapuglist to list and enumerate POSIX-like account entries in an LDAP directory
server. Below are examples of how to use ldapuglist to list user entries.
While use of LDAP_BINDDN is not typically required to use ldapuglist, the LDAP_BINDDN
and LDAP_BINDCRED environment variables can be used to specify the Distinguished Name
and password of a user with sufficient directory server privilege to display protected attributes.
Alternately, you can also input LDAP administrator bind identity and credential interactively
with a prompt (-P) option.
Setting the LDAP_BINDDN and LDAP_BINDCRED environment variables is optional when using
ldapuglist. The following commands set these two variables
export LDAP_BINDDN = "cn=Jane Admin,ou=admins,dc=org,dc=example,dc=com"
export LDAP_BINDCRED = "Jane's password"
The following commands display an account entry for the user, mlee:
cd ./opt/ldapux/bin
./ldapuglist -t passwd -n mlee
The output of the above command is as follows:
dn: cn=Mike Lee,ou=Users,dc=org,dc=example,dc=com
cn: Mike Lee
uid: mlee
uidNumber: 900
gidNumber: 2010
loginShell: /usr/bin/sh
homeDirectory: /home/mlee
gecos: mlee,Building-5,555-555-5555
The following command displays account entries available in the LDAP directory server:
./ldapuglist -t passwd
The output of the above command is as follows:
dn: cn=Mike Lee,ou=Users,dc=org,dc=example,dc=com
cn: Mike Lee
uid: mlee
uidNumber: 900
gidNumber: 2000
loginShell: /usr/bin/sh
homeDirectory: /home/mlee
gecos: mlee,Building-5,555-555-5555
dn: cn=Michael Sheu,ou=people,dc=example,dc=com
126 Administering LDAP-UX Client Services