LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

./ldapugadd -t passwd -PW -f "Mike Tam" -g 200 mtam surname="Tam"
The command adds an account entry for user mtam, with the user's primary login group id being
200. The ldapugadd tool creates the password for the new user, 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 group number 200.
To display the new user entry mtam, enter the following command:
./ldapuglist -t passwd -n mtam
Sample output for this command follows:
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
Adding a user entry with specific attribute values
For an HP directory server, to add an account entry for user jsmart, with the user's primary login
group id 200 and the surname attribute value of Smart (Windows ADS does not support this
attribute). Again, the ldapugadd tool 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 group number 200. The ldapugadd tool
dynamically assigns the uidNumber value from the preconfigured range.
./ldapugadd -t passwd -PW -f "John Smart" -g 200 jsmart surname="Smart"
The following command displays the new user entry jsmart:
./ldapuglist -t passwd -n jsmart sn
Sample output follows:
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 issued in an HP directory server environment adds an account entry for
user tsheu, with the user's primary login group number as 350. With the -I option, this command
specifies the gecos field information. 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.
(Windows ADS does not support the surname attribute.)
./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, including mapped attribute
information:
./ldapuglist -t passwd -m -n tsheu
Example output follows (HP directory server environment):
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
224 Administering LDAP-UX Client Services