LDAP-UX Client Services B.05.00 with Microsoft Windows Active Directory Server Administrator's Guide (obsolete beyond B.05.00)
The ldapcfinfo tool can provide the following information by examining LDAP UG template
files, LDAP UG configuration file or the LDAP-UX configuration profile:
◦ Determine if the LDAP-UX is properly configured and active.
◦ Discover the current LDAP UG configuration defaults, such as home directory and login
shell.
◦ Discover the distinguished name (DN) of the LDAP-UX configuration profile and the
directory server name which stores that profile.
◦ 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 a 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 a directory server.
6.7.2 Listing users
You can use ldapuglist to list and enumerate POSIX-like account entries in a 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,cn=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 directory server:
./ldapuglist -t passwd
The output of the above command is as follows:
116 Administering LDAP-UX Client Services