Skip to main content
Version: 1.4

change-password

change-password sets a new password for an account of the administrator panel. It changes only the password and leaves the account and everything else as it is. Use it when nobody can log in to change the password on the Access control page, for example after the password of admin was lost.

sudo -u msh /opt/msh-zr/bin/mshctl change-password <username>

Run it on the server where the web admin runs, see Running mshctl.

Parameters​

ParameterRequiredMeaning
<username>YesThe login name of the account, for example admin
-h, --helpNoShow the help of the command

The new password is not a parameter: the command asks for it twice and does not show what you type, so it never appears in the shell history or the process list.

Example​

sudo -u msh /opt/msh-zr/bin/mshctl change-password admin
New password for 'admin':
Repeat new password:
Password changed for user 'admin'.

Log in with the new password right away; the web admin does not have to be restarted.

Errors​

The command changes nothing when it fails, and ends with exit code 1:

MessageReason
change-password: user 'olivia' does not exist.No account has this login name. The names are listed on the Access control page.
change-password: password must not be empty.Nothing was typed at the first prompt
change-password: passwords do not match.The two passwords differ
change-password: database not found: /opt/msh-zr/etc/msh-zr-web.dbThe command runs on a server without the web admin, for example an MTA server of a multi-server installation

Additional resources​