commands

passwd — change account password

Changes password subject to local authentication policy; privileged callers may manage other accounts. -S reports password status when authorized. A locked password is not a guarantee of total account disablement. Example is help only; never supply a secret in command arguments. Example assumes a fresh account lab fixture; VM-only examples require explicit authorization.

Formal Syntax & Structure

linux syntaxlinux
passwd [OPTION] [LOGIN]

Parameters & Attributes

NameTypeDescription
-Soptionstatus
LOGINoperandoptional account

Return Value

exit status and output

Changes password subject to local authentication policy; privileged callers may manage other accounts. -S reports password status when authorized. A locked password is not a guarantee of total account disablement.

Working Example

Example Snippetlinux
passwd --help >/dev/null && printf "help available\n"
Linux Reference