LDAP-UX Client Services B.05.00 Administrator's Guide

loginShell[loginshell]: /usr/bin/sh
gecos[cn]: Tom Sheu
gecos[l]: Building-1A
gecos[telephone]: 555-555-5555
Command arguments applicable to -t passwd
The following are the options and arguments used in the above examples of the ldapugadd
-t passwd commands:
-t <type> Specifies the type of entry the ldapugadd tool operates. <type>
can be passwd or group. The passwd type represents LDAP user
entries which contain POSIX account-related information. The
group type represents LDAP group entries which 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 the following four fields which represent (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.
5.5.4.3 Examples of adding a group
Use the following command to add a new group entry for the group name, groupA. In this
example, ldapugadd creates the new group, groupA, and 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)"
The output of the group entry is as follows:
dn: cn=groupA,ou=Group,dc=example,dc=com
cn: groupA
gidNumber: 550
memberUid: tsheu
166 Administering LDAP-UX Client Services