|USERMOD(8)||System Manager's Manual||USERMOD(8)|
usermod — modify
user login information
usermod utility modifies user login
information on the system.
Default values are taken from the information provided in the /etc/usermgmt.conf file, which, if running as root, is created using the built-in defaults if it does not exist.
After setting any defaults, and then reading values from /etc/usermgmt.conf, the following command line options are processed:
-moption is specified, tries to move the old home directory to home-directory.
-Sare mutually exclusive.
-ggid | name |
usermodcreates a group with the same ID as the UID; if such a group already exists a warning is given and no group is created. Groups can be preset for all users by using the group field in the /etc/usermgmt.conf file. See usermgmt.conf(5) for more details.
-’ or ‘
-dis not specified, the new-user argument of the
-loption is used; one of
-Gare mutually exclusive.
-’ from the user's shell and the ‘
*’ prefix from the password.
-Zare mutually exclusive and cannot be used with
-’ to the user's shell and prefixing the password with ‘
-Uare mutually exclusive and cannot be used with
Once the information has been verified,
pwd_mkdb(8) to update the user
database. This is run in the background and, at very large sites, could take
several minutes. Until this update is completed, the password file is
unavailable for other updates and the new information is not available to
usermod utility exits 0 on
success, and >0 if an error occurs.
Other implementations of the
utility use the inactive-time parameter to refer to
the maximum number of days allowed between logins (this is used to lock
"stale" accounts that have not been used for a period of time).
However, on OpenBSD systems this parameter refers
instead to the password change time. This is due to differences in the
passwd(5) database compared to other
usermod utility first appeared in
usermod utility was written by
Alistair G. Crooks
|November 30, 2016||OpenBSD-current|