LDAP-UX Client Services B.04.10 with Microsoft Windows Active Directory Server Administrator's Guide

1. Use the nsquery(1) command to test the name service:
nsquery lookup_type lookup_query [lookup_policy]
For example, to test the name service switch to resolve a username lookup, enter:
nsquery passwd username ldap
where usernameis the login name of a valid user whose POSIX account information is in
the directory. You should see output something like the following depending on how you
have configured /etc/nsswitch.conf:
Using "ldap" for the passwd policy.
Searching ldap for jbloggs
User name: jbloggs
user Id: 10000
Group Id: 2000
Gecos:
Home Directory: /home/jbloggs
Shell: /bin/sh
Switch configuration: Terminates Search
This tests the NSS configuration in /etc/nsswitch.conf. If you do not see output similar
to above, check /etc/nsswitch.conf for proper configuration.
2. Use other commands to display information about users in the directory, making sure the
output is as expected:
pwget -n username
grget -n groupname
ls -l
3. NOTE: While you can use the following commands to verify your configuration, these
commands enumerate the entire passwd or group database, which may reduce network
and directory server performance for large databases:
pwget (with no options)
grget (with no options)
listusers
logins
4. Use the beq search utility to search for the following services: pwd (password), grp (group),
shd (shadow password), srv (service), prt (protocol), rpc (RPC), hst (host), net (network),
ngp (netgroup), and grm (group membership). An example beq command using name as
the search key, grp as the service, and ldap as the library is shown below.
./beq -k n -s grp -l /usr/lib/libnss_ldap.1 igrp1
nss_status........NSS_SUCCESS
pw_name...........(iuser1)
pw_passwd.........(*)
pw_uid............(101)
pw_gid............(21)
pw_age............()
pw_comment........()
pw_gecos..........(gecos data in files)
pw_dir............(/home/iuser1)
pw_shell..........(/usr/bin/sh)
pw_audid..........(0)
pw_audflg.........(0)
Configuring LDAP-UX Client Services 47