LDAP-UX Client Services B.04.15 with Microsoft Windows Active Directory Server Administrator's Guide (edition 8)

Table Of Contents
-g <default_gid>
Specifies the default group ID number used when creating
new user entries.
-g <min_gid>:<max_gid>
Sets new default minimum and maximum ranges that
ldapugadd uses when provisioning a GID number for new
group entries.
-s <default_shell> Sets new default login shell that ldapugadd uses when
creating a new user entry.
-d <default_home> Sets new default parent home directory that ldapugadd uses
when creating a new user home directory.
Modifying a User
You can use ldapugmod tool to modify exiting POSIX accounts or groups in an LDAP directory
server. This section provides examples of using ldapugmod to modify user entry information.
Use LDAP_BINDDN to specify the Distinguished Name (DN) of a user with sufficient directory
server privilege to modify users or groups in the directory server. Use LDAP_BINDCRED to specify
a password for the LDAP user specified by LDAP_BINDDN. Alternately, you can input LDAP
administrator bind identity and credential interactively with a prompt (-P) option.
The LDAP_UGCRED environment variable specifies the new password of a user or group being
modified. You must specify the -PW option when using LDAP_UGCRED. Alternately, you can use
the -PP command option to prompt for the new password of user or group being modified.
The following commands set the LDAP_BINDDN and LDAP_BINDCRED environment variables:
export LDAP_BINDDN = "cn=Jane Admin,ou=admins,dc=org,dc=example,dc=com"
export LDAP_BINDCRED = "Jane's password"
The following commands change the password of the user, mtam, using the new user password
defined in LDAP_UGCRED:
cd /opt/ldapux/bin
export LDAP_UGCRED = "mtam's new password"
./ldapugmod -t passwd -PW mtam
The following command replaces the uidNumber attribute with the new value for the user entry,
mswartz:
./ldapugmod -t passwd -u 300 mswartz
The following command replaces the loginShell attribute with the new value for the user
entry, mLou:
./ldapugmod -t passwd mLou "loginShell=/net/bin/ksh"
The following command removes the gidNumber attribute and value for the user entry, alee:
./ldapugmod -t passwd -R "gidNumber=250" alee
The following command replaces the gecos fields with the new values for the user entry, alouie:
./ldapugmod -t passwd -I "Ann Louie,Building-6,222-2222" alouie
The following command adds the description attribute and value to the user entry, mscott:
./ldapugmod -t passwd -A "description=test user entry" mscott
User and Group Management 133