LDAP-UX Client Services B.05.00 Administrator's Guide
Run the following commands to discover what non-POSIX attributes defined in the default
template file are required to create the new user entry:
cd /opt/ldapux/bin
./ldapcfinfo -t passwd -R
The output of the commands is as follows:
Surname
The following commands add an account entry for the user, alam, with the user's primary login
group id, 300, and the surname, Lam. The ldapugadd tool creates the password for new user,
alam, 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
300. The uidNumber value is assigned dynamically from the pre-configured 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
Below 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
Below 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.
248 Command and tool reference