Search notes:
Shell command: chpasswd
chpasswd
can be used to change
passwords in
batch mode.
The following snippet changes the password of the user fred to secretGarden.
Apparently, it is useful if sudo was run recently and thus, root's password needs not be entered here.
echo 'fred:secretGarden' | sudo passwd