OCC Command for adding user to a group

Hello
I am searching the OCC Command for adding a user to a group. Can antone help me with that?

Regards,
Kuno

Hello icodes,

the command should be:

sudo -u www-data php occ group:adduser groupname username

More details can be found here:

https://docs.nextcloud.com/server/17/admin_manual/configuration_server/occ_command.html#group-commands

3 Likes

Oh thanks!!!
You helped me so much.
I am running a Docker Nextcloud instance in Unraid. My Cloud instance is connected to my SSO Auth0. My normal user account is no admin. But my account on Nextcloud self is admin. But for some reason it will stay loading when i entered my credentials in Nextcloud. Now that is no problem since i am now administrator on my SSO account.