chpass Command Examples

Add or change user database information, including login shell and password. See also: passwd. More information: https://man.freebsd.org/cgi/man.cgi?chpass.

su -c chpass

chpass -s {{path/to/shell}}

chpass -s {{path/to/shell}} {{username}}

su -c 'chpass -e {{time}} {{username}}'

su -c 'chpass -p {{encrypted_password}} {{username}}'

su -c 'chpass -h {{hostname}} {{username}}'

su -c 'chpass -d {{domain}} {{username}}'