Occ ldap:update-group _ALL_ on a schedule?

Hi All,

I have an LDAP server running and have always had an issue that when I update groups on the LDAP server those changes never get through to the owncloud server.

Today I found the ldap:update-group occ command and this appears to have fixed my issues. I was supprised to see that there was not a * option or an _all option so made the following command line which seems to work.

sudo -u www-data php /var/www/owncloud/occ group:list | cut -c 5- | xargs -I group_name sudo -u www-data php /var/www/owncloud/occ ldap:update-group group_name

I then thought that I could drop a cronjob on the system to run this command overnight but thought it would be a good idea to check in here first and see if I am missing something and if people think that command looks safe to use on a regular automated basis.

Thoughts?

Hi @garethw
Do you have the following cron job installed?
https://doc.owncloud.com/server/10.3/admin_manual/configuration/server/occ_command.html#syncing-user-accounts

occ user:sync -vvv -m remove -n "OCA\User_LDAP\User_Proxy"

That should also update your groups and I think it is recommended to set up to run a couple of times a day, when LDAP is used.

1 Like