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

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.
./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 homeDirectory:
/home/wang loginShell: /usr/bin/sh sn: Wang
The following command adds a new group entry for the group name, groupA. In this example,
ldapugadd creates the new group, groupA, and defines the initial group membership by adding
the user account, mwang, as a member.
./ldapugadd -t group -M mwang groupA
Use the following command to display the new group entry, groupA:
./ldapuglist -t group -f "(cn=groupA)"
The output of the group entry is as follows:
dn: cn=groupA,ou=Group,dc=example,dc=com
cn: groupA gidNumber: 550 memberUid: mwang
The following command sets new default minimum and maximum ranges of UID numbers in
the local configuration file, /etc/opt/ldapux/ldapug.conf. When creating a new user
account, the ldapugadd tool randomly selects a new ID from this range if an account number
has not been specified.
./ldapugadd -D -t passwd -u 200:5000
The following command sets new default minimum and maximum ranges of GID numbers in
the local configuration file, /etc/opt/ldapux/ldapug.conf. When creating a new group,
the ldapugadd tool randomly selects a new ID from this range if a group number has not been
specified.
./ldapugadd -D -t group -g 300:3000
The following command sets the new default group ID number in the local configuration file,
/etc/opt/ldapux/ldapug.conf. The ldapugadd tool uses this value when creating a new
user entry in an LDAP directory server.
6.3 LDAP User and Group Management Tools 173