Reset your NextCloud administrator password from the ssh console

The following guide describes how to reset the password to the nextcloud administration panel if you forget it and the password reminder via e-mail does not work.
We will do the whole thing by issuing a simple command.

Log in to ssh preferably at the user level, although it can be root, and go to the directory where our nextcloud files are located.
And we give the order:

We will be asked to enter a new password.

occ user:resetpassword admin we replace admin with our username nextcloud.

When we are logged in to the root account, the matter is practically the same, we must execute the command with user rights:

sudo -u nextcloud php occ user:resetpassword admin Nextcloud is replaced with the username for which the script is installed.

How useful this post was?

Click on the star, to evaluate it!

Average grade / 5. number of votes:

So far, no votes! Be the first to rate this post.