mirror of
https://github.com/uutils/shadow.git
synced 2026-06-10 16:14:57 -07:00
4259dc7cd0
- README: fix passwd flag count (17→16), add Landlock mention, add Hardened goal, update usermod description with -p, fix past tense - CONTRIBUTING: fix unsafe description to match actual workspace policy - CHANGELOG: add [Unreleased] section for post-v0.1.0 changes - OPENBSD-REFERENCE: move all implemented items to correct section - SECURITY-HARDENING: mark all 21 items as implemented - man/usermod: add -p/--password flag documentation
2.0 KiB
2.0 KiB
usermod(8) - modify a user account
NAME
usermod - modify a user account
SYNOPSIS
usermod [options] LOGIN
DESCRIPTION
The usermod command modifies the system account files to reflect the changes that are specified on the command line.
OPTIONS
- -a, --append
- Append the user to the supplementary group(s) specified by -G. Use only with the -G option.
- -c, --comment COMMENT
- Set the new value of the user's GECOS field.
- -d, --home HOME_DIR
- Set the new home directory for the user.
- -e, --expiredate EXPIRE_DATE
- Set the account expiration date.
- -f, --inactive INACTIVE
- Set the password inactive period.
- -g, --gid GROUP
- Set the new primary group ID (numeric).
- -G, --groups GROUPS
- Set the list of supplementary groups (comma-separated). If the -a option is not used, the user is removed from all groups not listed.
- -l, --login NEW_LOGIN
- Change the user's login name.
- -L, --lock
- Lock the user's password by prepending a '!' to the shadow password.
- -p, --password PASSWORD
- Set the user's password to the specified pre-hashed value. The hash must not contain ':', '\n', or '\r' characters.
- -P, --prefix PREFIX_DIR
- Use PREFIX_DIR as a prefix for system file paths.
- -R, --root CHROOT_DIR
- Apply changes in the CHROOT_DIR directory.
- -s, --shell SHELL
- Set the new login shell.
- -u, --uid UID
- Set the new numeric user ID.
- -U, --unlock
- Unlock the user's password by removing the '!' prefix from the shadow password.
EXIT STATUS
- 0
- Success.
- 1
- Cannot update password file.
- 2
- Invalid command syntax.
- 4
- UID already in use.
- 6
- User does not exist.
FILES
- /etc/passwd
- User account information.
- /etc/shadow
- Secure user account information.
- /etc/group
- Group account information.
SEE ALSO
useradd(8), userdel(8), groupmod(8), passwd(1)