Checking the LDAP Server Configuration

The ldap_check utility validates the contents of the ./ldapcd.conf or /etc/ldapcd.conf file as follows:

Verifies that the specified directory servers are running and that connections to the servers can be made

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 : 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.

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 -foption). Optionally, you can use the -roption (with the -foption) 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 -ioption. For example:

#passwd_extract larry curly moe -i myusers -f stooges

The records in the input file must be formatted as passwd entries.

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

Utilities for Maintaining User Information in the LDAP Directory Server

81

Page 81
Image 81
HP UX Internet Express Software manual Checking the Ldap Server Configuration, Extracting Users from the /etc/passwd File