How to give the Administrator User of nextcloud admin rights back again

In the version 0.7.2 the Administrator of Nextcloud is loosing his admin rights because it is handled as a local nextcloud user and not as the ldap Administrator user. The local nextcloud admin user is not in the group “Domain Admins” (which every new administrator is from the version 0.7.2) and can’t be added to it because the “Domain Admins” group is from ldap.

To give back admin rights you have to update to 0.7.3 or higher and then run this command at your libre workspace:

sudo -u www-data php /var/www/nextcloud/occ group:adduser admin Administrator

How to connect to libre workpsace command line: General Administration

Because in 0.7.3 the admin sync script only revokes admin rights for a nextloud user if it is not in the “Domain Admins” group anymore AND the user is NOT called “Administrator”.