cd /path/to/owncloud sudo -u webserveruser php occ user:resetpassword adminaccountnameIn our case the command was:
cd /var/www/cloud sudo -u www-data php occ user:resetpassword adminIt should prompt you for your password twice:

Websites and SEO
cd /path/to/owncloud sudo -u webserveruser php occ user:resetpassword adminaccountnameIn our case the command was:
cd /var/www/cloud sudo -u www-data php occ user:resetpassword adminIt should prompt you for your password twice:
Configuration could not be verified – is the user name or password wrong?After double checking that the password is indeed correct, the most common cause we have found for this is that IMAP is disabled in your gmail settings. Log into your gmail via a web browser and click on the gear in the top right, then select:
Settings -> Forwarding and Pop/IMAPOnce you are in the Forwarding and Pop/IMAP tab, scroll down until you see:
IMAP AccessHopefully the radio button for Disable IMAP is selected. If so, select “Enable IMAP”, save your settings and try again. Hopefully that ends your frustrating login attempts!
net user [username] *In this case:
net user administrator *You will be prompted to enter a new password without having to provide the existing password first. To get a list of the users on the system, you can run:
net usersUse this for good, not evil!
admin adminOn first login it’ll force a password change.
mysqladmin -u root -p password NEWPASSWORDEnter the current root password when prompted and replace NEWPASSWORD with the desired password. This should return you to the command prompt, and you can test whether it was successful by logging in:
mysql -u root -p
mysql -u root -pLog in using your root password. Next, list your databases:
show databases;On our test system this shows all of our databases like so:
mysql> show databases; +——————–+ | Database +——————–+ | information_schema | mysql | performance_schema | press | test | wiki +——————–+ 6 rows in set (0.10 sec)Select your wiki’s database:
USE wiki;Replace “wiki” in the above with your own database’s name.
UPDATE user SET user_password = MD5(CONCAT(user_id, ‘-‘, MD5(‘newpasswordgoeshere’))) WHERE user_name = ‘usernameofuser’;If this is successful you should get the following:
Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0If something has gone wrong (e.g. a non-existent username) you will get the following instead:
Query OK, 0 rows affected (0.03 sec) Rows matched: 0 Changed: 0 Warnings: 0All done! To leave mysql just type “exit”.