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

Note:
If any of the LDAP servers specified in the ldapcd.conf file fail the verification, the
remaining servers are not checked and the entire verification fails.
Verifies that the search base (the top-level directory for searches) exists
If specified, verifies that user and group branches exist (see Section 4.1.2: Creating Branches)
Verifies that user and group object classes exist
Validates all object classes and attributes
If a problem is encountered during either of these checks, the ldap_check utility returns an
exit code greater than 0.
4.4.2 Extracting Users from the /etc/passwd File
Use the passwd_extract utility to extract users from the specified input file (/etc/passwd
is the default) and store the extracted records in the specified output file (with the -f option).
Optionally, you can use the -r option (with the -f option) to extract entries that do not match
the selection criteria to a remainder file. The records in the output file and remainder file (if any)
are formatted as passwd(4) entries.
You can extract users based on:
User name, specified by a space-separated parameter list:
passwd_extract hill susan mike cliff austin powers
Note that if no output file is specified, the default is stdout.
Any combination of individual UIDs or range of UIDs:
passwd_extract -u 500,624,700-800 -f output-file
Any combination of individual GIDs or range of GIDs:
passwd_extract -g 23,29-35,50 -f output-file
Any combination of names, UIDs and GIDs:
passwd_extract -e james bond -u 500,624,700-800 -g 23,29-35,50 -f output-file
To extract records from a file other than /etc/passwd, specify the input file name with the -i
option. For example:
# passwd_extract larry curly moe -i myusers -f stooges
The records in the input file must be formatted as passwd entries.
4.4.3 Adding a User Entry
The ldap_add_user utility adds one or more user entries to the LDAP database. To use this
utility on the command line, provide the following arguments:
ldap_add_user logname passwd uid gid gecos homedir shell
The ldap_add_user utility adds users to the first directory server specified in the ldapcd.conf
file. If multiple servers are listed, only the first is used, even if it is not operational. The
distinguished name (DN) is constructed as follows:
logname_attribute=logname,branch
The logname_attribute is replaced by the attribute name specified by the pw_username
entry in the ldapcd.conf file. The logname is the user's login name. The branch is one of
three possible values, taken in this order:
1. Value specified on the command line using the -b option
2. Value of the userbranch attribute in the ldapcd.conf file
3. Value of the searchbase attribute in the ldapcd.conf file
4.4 Utilities for Maintaining User Information in the LDAP Directory Server 85