usermod.1m (2010 09)

u
usermod(1M) usermod(1M)
6 The login to be modified or the group specified with the
-g option does not exist.
8 The login to be modified is in use.
9 new_logname is not unique.
10 Cannot modify the /etc/group file. The other parts of the update request will be per-
formed.
11 There is insufficient space to move the home directory (with the
-m option). The other parts of
the update request will be performed.
12 Unable to complete the move of the home directory to the new home directory.
13 Unable to open /etc/ptmp file, or
/etc/passwd file is non-existent.
14 /etc/passwd
file or /etc/ptmp file busy. Another command may be modifying the
/etc/passwd file.
15 Cannot modify the entry in the /etc/passwd
file.
18 Out of memory.
19 Invalid template file.
54 Exceeding permissible limit of maximum members in a group. The /etc/group file is not
modified.
EXAMPLES
Change
otto’s primary group to staff.
usermod -g staff otto
Change otto’s user ID to 333 and change the login name to bob.
usermod -u 333 -l bob otto
WARNINGS
A directory can be shared between the users belonging to the same group. If the home directory is in
unshared mode and a new user is allocated to that directory, then it will be put into shared mode by set-
ting the permissions of that directory to 775 (includes the write permissions to the group as well). Also,
the directory which will be shared should have read and execute permissions for the group. Other-
wise, usermod will report an error.
Because many users may try to write the
/etc/passwd file simultaneously, a password locking
mechanism was devised. If this password locking fails after subsequent retrying, usermod terminates.
While modifying the user login, the username is not added to the primary group entry in the
/etc/group file. If a supplemental group is specified, the user is added to the supplemental group. If
the size of a group entry in /etc/group file exceeds LINE_MAX limit, a new entry of the same group is
created and a warning message is issued. See limits (5) for the value of LINE_MAX.
FILES
/etc/shadow Shadow password file
/etc/passwd System password file
/etc/group System group file
/etc/ptmp Lock file used when updating password file
SEE ALSO
passwd(1), users(1), groupadd(1M), groupdel(1M), groupmod(1M), logins(1M), pwconv(1M), useradd(1M),
userdel(1M), crypt(3C), crypt2(3C), group(4), shadow(4), usermod(4), limits(5), usergroupname(5).
STANDARDS CONFORMANCE
usermod: SVID3
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3