LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS
the user entry, ldapugadd attempts to add this user as a member of the group number 300. The
uidNumber value is assigned dynamically from the preconfigured range.
cd /opt/ldapux/bin
./ldapugadd -t passwd -PW -f "Adrian Lam" -g 300 alam surname="Lam"
Run the following command to display the new user entry, alam:
./ldapuglist -t passwd -n alam sn
The following is the user entry:
dn: cn=Adrian Lam,ou=people,dc=example,dc=com
cn: Adrian Lam
uid: alam
uidNumber: 2200
gidNumber: 300
homeDirectory: /home/alam
loginShell: /usr/bin/ksh
sn: Lam
The following command adds an account entry for the user, mscott, with the user's primary login
group id, 200, and gecos field information. In this example, the gecos attribute has been mapped
to cn, l and telephoneNumber in the LDAP-UX configuration profile. ldapugadd creates the
password for new user, mscott, 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 200.
./ldapugadd -t passwd -PW -g 200 \
-I "Mike Scott,Building-3A,555-555-5555" mscott surname="Scott"
Use the following command to display the new user entry, mscott, with mapped attribute
information:
./ldapuglist -t passwd -m -n mscott
The following is the user entry:
dn: cn=Mike Scott,ou=people,dc=example,dc=com
cn[cn]: Mike Scott
uid[uid]: mscott
uidNumber[uidnumber]: 2200
gidNumber[gidnumber]: 200
homeDirectory[homedirectory]: /home/mscott
loginShell[loginshell]: /usr/bin/sh
gecos[cn]: Mike Scott
gecos[l]: Building-3A
gecos[telephoneNumber]: 555-555-5555
The following command adds an account entry for the user, mwang, with the user's primary login
group id, 350. In this example, ldapugadd creates the user home directory /home/wang and
assigns user and group ownership of the newly created directory to the user mwang and his primary
login group after successfully adding the user entry to the directory server and adding the user to
the primary login group. ldapugadd uses the password specified in the LDAP_UGCRED environment
variable to create the password for the new user, mwang.
./ldapugadd -t passwd -PW -f "Mike Wang" -g 350 \
-m -d "/home/wang" mwang surname="Wang"
Use the following command to display the new user entry, mwang:
./ldapuglist -t passwd -n mwang sn
The output of the user entry is as follows:
dn: cn=Mike Wang,ou=people,dc=example,dc=com
cn: Mike Wang
uid: mwang
uidNumber: 2255
gidNumber: 350
312 Command and tool reference