chpass
Add or change user database information, including login shell and password. tldr-pages
On macOS, FreeBSD, NetBSD, OpenBSD
macOS
Add or change user database information, including login shell and password. Note: It's not possible to change the user's password on Open Directory systems, use passwd instead.
Add or change user database information for the current user interactively
su -c chpassIdentify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxSet a specific login shell for the current user
chpass -s path/to/shellIdentifySet a login shell for a specific user
chpass -s path/to/shell usernameIdentifyEdit the user record on the directory node at the given location
chpass -l location -s path/to/shell usernameIdentifyUse the given username when authenticating to the directory node containing the user
chpass -u authname -s path/to/shell usernameIdentifyFreeBSD
Add or change user database information for the current user interactively
chpassSet a specific login shell for the current user
chpass -s path/to/shellSet a login shell for a specific user
chpass -s path/to/shell usernameChange the account expire time (in seconds from the epoch, UTC)
su -c 'chpass -e time username'Identify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxChange a user's password
su -c 'chpass -p encrypted_password username'Identify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxSpecify the hostname or address of an NIS server to query
su -c 'chpass -h hostname username'Identify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxSpecify a particular NIS domain (system domain name by default)
su -c 'chpass -d domain username'Identify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxNetBSD
Set a specific login shell for the current user interactively
chpassSet a specific login shell for the current user
chpass -s path/to/shellSet a login shell for a specific user
chpass -s path/to/shell usernameSpecify a user database entry in the passwd file format
su -c 'chpass -a username:encrypted_password:user_id:group_id:... -s path/to/shell' usernameIdentify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxOnly update the local password file
su -c 'chpass -l -s path/to/shell' usernameIdentify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxForcedly change the database yP password database entry
su -c 'chpass -y -s path/to/shell' usernameIdentify-cCommand line to pass to -s shell (ala sh -c "CMD") toyboxOpenBSD
Set a specific login shell for the current user interactively
chpassSet a specific login shell for the current user
doas chpass -s path/to/shellIdentifyTrips 1 Sigma rule: lowLinux Doas Tool Execution by Sittikorn S, Teoderick Contreras
Set a login shell for a specific user
doas chpass -s path/to/shell usernameIdentifyTrips 1 Sigma rule: lowLinux Doas Tool Execution by Sittikorn S, Teoderick Contreras
Specify a user database entry in the passwd file format
doas chpass -a username:encrypted_password:uid:gid:...IdentifyTrips 1 Sigma rule: lowLinux Doas Tool Execution by Sittikorn S, Teoderick Contreras