LDAP-UX Client Services B.04.15 Administrator's Guide
./ldapuglist -t passwd -n jsmart sn
Below is the new user entry:
dn: cn=John Smart,ou=people,dc=example,dc=com
cn: John Smart uid: jsmart uidNumber: 2350 gidNumber: 200 homeDirectory:
/home/jsmart loginShell: /usr/bin/ksh sn: Smart
The following command adds an account entry for the user, tsheu, with the user's primary
login group id, 350, and gecos field information. In this example, the gecos attribute has been
mapped to cn, l and telephone in the LDAP-UX configuration profile. ldapugadd creates
the password for new user, tsheu, using the password specified in the LDAP_UGCRED
environment variable. After creating the user entry, ldapugadd attempts to add this user as a
member of the group number 350.
./ldapugadd -t passwd -PW -g 350 -I "Tom Sheu,Building-1A,555-555-5555"
tsheu surname="Sheu"
Use the following command to display the new user entry, tsheu, with mapped attribute
information:
./ldapuglist -t passwd -m -n tsheu
Below is the user entry:
dn: cn=Tom Sheu,ou=people,dc=example,dc=com
cn[cn]: Tom Sheu uid[uid]: tsheu uidNumber[uidnumber]: 2200 gidNumber[gidnumber]:
350 homeDirectory[homeDirectory]: /home/tsheu 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
5.6 User and Group Management 117