How to activate a disabled Adminaccount?

Hi

I installed NextCloud with MySql Behind
For some reason my unique admin account is disabled. I think the reason was because of too many attempts.

I need to activate it because it’s the only admin account i have.

I tried to find it in the database but i couldn’t find where to enable it.

Anyone?
opera_yPNoBfUrWG

login to your server using SSH, switch to the Nextcloud document root and use the occ cmmand line tool to enable the user again, e.g. ./occ user:enable <username>.

Another option is to open phpMyAdmin and go to “oc_group_user”.

Find a user which a account that can login, copy that user and change the the name in “gid” in “admin”.

I’ve just had the same problem, changed a normal account into a admin account and after logging in I could activate the Admin by the account settings.

Good luck.

1 Like

Thanks!! That worked! :wink:

I have a webhost, so Alphia’s answer was more appropriate for me. Thanks Anyway for the help! :slight_smile:

I installed a new site with nextcloud but the new database doesn’t contain “oc_group_user” table,
Is there any other way to activate the accounts through the database?

Try to create the table manually:

> describe oc_group_user;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| gid   | varchar(64) | NO   | PRI |         |       |
| uid   | varchar(64) | NO   | PRI |         |       |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.007 sec)
1 Like

I got it work with another admin user. But i will try with the table if it occur again. Thanks anyway.