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

./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.
./ldapugadd -D -t passwd -g 500
The following command sets the new default login shell in the local configuration file, /etc/
opt/ldapux/ldapug.conf. The ldapugadd tool uses this login shell when creating a new
user entry in an LDAP directory server.
./ldapugadd -D -t passwd -s /usr/net/bin/sh
Run the following commands to unset the LDAP_BINDDN, LDAP_BINDCRED and LDAP_UGCRED
environment variables:
unset LDAP_BIND
unset LDAP_BINDCRED
unset LDAP_UGCRED
7.3 LDAP user and group management tools 249