Cannot add user or group to Nextcloud

I just completed the installation of Nextcloud-17.0.1 (again) and this time when I created the admin account I used the name nextadmin.

So, with this in mind I am concerned as to why I cannot create accounts, nor groups in the nextcloud console.

Is the problem the fact that the admin account is not explicitly “admin?” Do I have to redo everything again to get a Nextcloud installation that works?

I’ve had similar issues on machines that have had previous versions of Nextcloud (and even ownCloud).

In my case, it was because there were existing tables and accounts left in MySQL. Those account names are associated with the previous versions, and so can’t be reused. You have to go into MySQL (or whatever you used) and drop those databases.

Once those databases and tables are gone, you should be able to create new users by the same name.

I hope that helps, good luck!

Thanks @DarkDteve, do you know the names of the tables?

Thanks for the reply.

I just dropped the entire database.

I logged into MySQL as the user Nextcloud uses, and typed “show databases;”

I give all my databases a name that makes it obvious what it’s for. This is the result of the above command:
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| nextcloud_db |
| performance_schema |
| roundcube_db |
| sys |
±-------------------+
6 rows in set (0.00 sec)

That made it easy, I just dropped nextcloud_db. You’ll have called yours something else. I dropped the Nextcloud database, uninstalled Nextcloud, deleted all the Nextcloud directories, and reinstalled it. Done.

I hope that helps! Sorry I can’t be more specific. I’m on FreeBSD so my locations will be different, and you have to enter the database name yourself when installing, so I can’t tell you what yours is called.

I discovered this when I was upgrading to Nextcloud from ownCloud. They were both installed on the same machine just fine, but I couldn’t create the same admin or user names for Nextcloud.

EDIT: I haven’t needed to do this for a while, so I’m trying to remember what happened. It’s possible you may need to reinstall MySQL too. Crap, sorry, it’s been years since I’ve been in this position and I can’t really remember what I had to do. It’s definitely because the users existed in MySQL, but now I think about it, I think I ended up removing and reinstalling MySQL too.

Thanks @DarkSteve, that is a lot more than what I had to go on.

I will figure something out. I have a feeling that I am going down this path you suggest.

Thanks again.