Issues with occ and reseting passwords

I’ve lost my admin password the other day (lpass cli issues… meh) and after looking through the documentation, I see that you can reset it using “occ user:resetpassword admin”.

I tried logging into nextcloud after resetting the admin password with no luck. It seems to be updating the database as I see the encrypted password column change everytime I run it, so I’m not sure what’s going on.

DB - 10.0.36-MariaDB-0ubuntu0.16.04.1
Server - Ubuntu 16.04.1
NextCloud - 15

Any suggestions?

You need to run the occ command in the directory where nextcloud is installed, and as the user the web server is running. Did you do this? With Ubuntu the user would be www-data. So the complete command is:

cd /var/www/nextcloud
sudo -u www-data php occ user:resetpassword admin

Thanks!

That’s exactly what I’ve been doing.

I tried from the Nextcloud install directory and prepending absolute path to occ. No luck.

Like I said, I see it change in the DB, but for some reason I cannt login using the updated password. Very strange.

Thanks again!

Strange indeed. I just tested the procedure on my NC15 test installation, though not on the admin user. It worked.

1 Like

Yeah… I’m not sure what I’m doing wrong here.

Here is an asciinema video showing what I’m doing. Still no luck

https://asciinema.org/a/eWGOdczIvDArklc0D8V6XL3XA

Is there support I can contact or something? I don’t want to have to blow this away and start from scratch