HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)
u
usermod(1M) usermod(1M)
July 13, 1993
7/13/93
A value of ’’ (two single quotes) or
"" (two double quotes) results in no expira-
tion date.
-p encrypted_password
Specify the encrypted password for the user. Before using the
-p option, obtain
the encrypted password by using
crypt() (see crypt(3C)).
-F Force the changes, even if the login is currently in use.
-P Indicate that modifications are to be made to the alternate password file of NIS
specified by the -S option. The following options edit the password file and should
not be used with the -P option:
-m, -i, -r, -k,
-F.
-S alternate_password_file
Specify the path of the alternate password file of NIS. The
-P option is used with
the
-S option.
The -e and -f options are supported only if Shadow Passwords are in use. For details refer to
pwconv(1M).
In the event where a directory is shared by users of the same group and the owner of that directory is
modified, then the ownership of that directory is propagated to the next user who is sharing that directory.
The new owner is determined by looking at the order in which the users sharing this directory are added to
the /etc/passwd file. If there is only one user remaining then the directory is brought back to unshared
mode by resetting the permissions to 755 from 775.
If a directory is shared by users, then one cannot change the primary group of any of these users unless the
home directory of that user is also changed.
NIS
The usermod command is aware of NIS user and group entries. Only local users and groups may be
modified with this command. Attempts to modify an NIS user or group will result in an error. NIS users
and groups must be administered from the NIS server. NIS users are checked when verifying the unique-
ness of the new UID or new user name, which may result in the following error messages:
login x does not exist
(return value 6) if the user specified is an NIS user (see passwd(4)). Also, the error
Cannot modify /etc/group file, /etc/passwd was modified
(return value 10) is returned if an NIS group is specified with either the -g
option or the -G option (see
group(4)).
NFS
Errors may occur with the
-m option if either the source or the target directory is within an NFS mounted
file system that does not allow root privileges across the NFS mount, and the directory or files within the
directory do not have sufficient permissions.
RETURN VALUE
usermod exits with one of the following values:
0 Successful completion.
2 Invalid command syntax.
3 Invalid argument supplied to an option.
4 uid is not unique (when -o is not used).
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 performed.
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 593