LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS
gecos[cn]: Tom Sheu
gecos[l]: Building-1A
gecos[telephone]: 555-555-5555
Command arguments
The following are the options and arguments used in the preceding examples of the ldapugadd
command:
-t <type> Specifies the type of entry the ldapugadd tool operates. <type>
can be passwd or group. The passwd type represents LDAP user
entries that contain POSIX account-related information. The group
type represents LDAP group entries that contain POSIX group-related
information.
-f <full_name> This optional argument only applies to the passwd service. This
option specifies the user's full name.
-g <gid/gid_nubmer> Specifies the user's primary login group name or ID number. After
creating the user entry, ldapugadd attempts to add the user as a
member of the specified group.
-I <gecos> Specifies the GECOS fields for the user. Typically the GECOS
argument contains four fields representing (in order):
• The user's full name
• The user's work location
• The user's work telephone number
• The user's home telephone number (often omitted)
Each field in the <gecos> argument must be separated by a
comma.
-PW Sets the user or group password attribute. If you specify -PW, you
must specify either the LDAP-UGCRED environment variable or the
-PP option.
<uid_name> Required argument. Specifies the POSIX style login name for the
new user entry. This argument must follow all command-line options
and must precede the <attr>=<value> parameters (if provided).
<attr>=<value> This option specifies arbitrary LDAP attributes and values.
<attr>=<value> parameters are optional and must be specified
as the last parameters on the command line.
7.7.1.3.2 Adding a group
Adding a group entry
The following ldapugaddcommand example shows how to add a new group entry groupA. The
command defines initial group membership by adding the user account tsheu as a member.
./ldapugadd -t group -M tsheu groupA
Use the following command to display the new group entry groupA:
./ldapuglist -t group -f "(cn=groupA)"
Example output follows:
dn: cn=groupA,ou=Group,dc=example,dc=com
cn: groupA
gidNumber: 550
memberUid: tsheu
7.7 Managing users and groups 225