Connect to SSH Terminal — Open any SSH terminal (ex: PuTTY), connect to your Ubuntu/CentOS server, and login as a server root user.
Get a one-time login URL for "root" user — Copy-paste the following command into SSH terminal and hit Enter key. sudo zesle login This command will generate a one-time login URL for you. Simply, copy-paste the generated URL into your browser.
Reset password for "root" user — Copy-paste the following command into SSH terminal and hit Enter key. sudo zesle passwd root '<NEW-PASSWORD-HERE>'
To reset other users password:
Connect to SSH Terminal — Open any SSH terminal (ex: PuTTY), connect to your Ubuntu/CentOS server, and login as a root user.
Reset password for any user account — Copy-paste the following command into SSH terminal and hit Enter key. sudo zesle passwd <USER-NAME-HERE> '<NEW-PASSWORD-HERE>'