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

The output of the commands is as follows
Surname
The following commands add an account entry for the user, mtam, with the user's primary login
group id, 200. ldapugadd creates the password for new user, mtam, using the user 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 200.
Run the following command to create the new account entry for the user, mtam:
./ldapugadd -t passwd -PW -f "Mike Tam" -g 200 mtam surname="Tam"
Run the following command to display the new user entry, mtam:
./ldapuglist -t passwd -n mtam
Below is the user entry:
dn: cn=Mike Tam,ou=people,dc=example,dc=com
cn: Mike Tam
uid: mtam
uidNumber: 2200
gidNumber: 200
homeDirectory: /home/mtam
loginShell: /usr/bin/ksh
The following command adds an account entry for the user, jsmart, with the user's primary
login group id, 200 and the sn attribute value. ldapugadd creates the password for new user,
jsmart, using the user 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
200. The ldapugadd tool dynamically assigns the uidNumber value from the pre-configured
range.
./ldapugadd -t passwd -PW -f "John Smart" -g 200 jsmart surname="Smart"
Run the following command to display the new user entry, jsmart:
./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
5.5 Managing users and groups 165