How to reset the admin password in Plesk Onyx

It’s not pretty when it happens, but it happens to the best of us: you forget the admin password for your Plesk Onyx installation.

In previous versions there was an option to retrieve this password via the command line, but that special command has been removed in Onyx for security reasons.

So what can we do? Well luckily it’s relatively easy to reset the password to something else, or gain temporary access to the server quickly. Let me show you how.

Option 1: Login with server root credentials

One option you always have is to not log in as admin at all, but instead login as root, using the root password you use to gain SSH access to your server. That’s a quick, easy and secure way to gain control of your server without having to delve into solving the actual problem.

The only problem is: it’s not actually going to solve your problem… I just thought I’d mention it here, because system admins are usually in a hurry with a to-do list longer than we care to admit.

Option 2: Changing the admin password – if you know it

If you know your admin password and you simply want to change it, you can do so from the left hand sidebar under My Profile – Change Password. If you can’t find the option, simply use the search box and look for “password”.

The only snag is: this dialogue will ask you for your current password, as well as the new password you’re thinking of using. That’s no good if you have no idea what the current admin password is. Nevertheless, the option is there should you need it.

Option 3: Using the plesk command line tool – always works

Finally we have a very powerful command line tool at our disposal, aptly called plesk. With it you can do a lot, including gain temporary access to your Plesk installation as well as specify a new password. Login to your server via SSH as root to get started.

To gain temporary access to your Plesk installation, we can use the following command:

plesk login

This will provide a long cryptic link that will log you straight it one time. This is another quick and easy option to gain access to your server. In fact, the tool gives you two links: one with the numeric IP to your server (which will always work, regardless of any DNS issues), and one with the server’s main domain.

But the tool can do more: you can simply specify a new password using the following command:

plesk bin admin --set-password -passwd NewPassword

Here, “NewPassword” is the new password. Use special characters to your heart’s content. The changes take effect immediately without a reboot being required.

Further Reading

I hope this has given you some ideas on how to handle the “lost password” experience with Plesk Onyx. For more information on the ever so powerful plesk command line tool, check out the Plesk Onyx documentation:

You can leave a comment on my original post.