Well, we can see some inconsistencies among the packages listed above.
Surely, ns7 has a new concept/use case that ns6 does not have: the remote account provider. In this case the user-deleted and group-deleted events can’t be catched.
After some months of real world experience, I’d prefer ns7 behaves exactly like ns6 on the local account provider scenario. Thus when a user/group is deleted, also local data dirs are removed.
But on remote scenario nothing can be done.
Confirmed. Mail aliases must be created manually. For local accounts provider on a mail server, an UI enhancement during user/group creation could be adding a checkbox that enables mail alias and shared mailbox creation.
Got it workable, do you want it only on group creation,…no update on group-modify, we could make a check box and update the group alias on event group-modify too
sharedmailbox-create will warn that the mailbox exists
IMHO, two ways
grep and test if the shared mail box exist before to trigger the event
implement a group-modify and a group-delete to expand more users as alias of a group and/or delete the shared mailbox and the users no more longer of that group.
As alternative approach, you could also query mysql
[root@here ~]# echo "select directory_uuid from oc_ldap_user_mapping where ldap_dn like 'cn=davidep,%';" | mysql nextcloud
directory_uuid
67C77753-DFC4-4A1C-80F5-9DA9BF54674B
the query depends on the accounts provider but can be generalized as
[root@here ~]# echo "select directory_uuid from oc_ldap_user_mapping where ldap_dn like 'cn=davidep,%' or ldap_dn like 'uid=davidep,%' ;" | mysql nextcloud
directory_uuid
67C77753-DFC4-4A1C-80F5-9DA9BF54674B
Both solutions are hacks: if the table schema or the command output change we have a problem…
indeed I did a wrong way, even if I remove the data folder, the mysql data are not removed and it breaks thinks as it continues to display owned files but of course you cannot browse them anymore.
nextcloud gets some documentation on this topic, of course at my first attempts it doesn’t work
[root@ns7loc2 ~]# su - apache -s /bin/bash -c "source /opt/rh/rh-php71/enable; cd /usr/share/nextcloud/; php occ ldap:show-remnants"
The current PHP memory limit is below the recommended value of 512MB.
+----------------+--------------+----------+---------+------------+-----+--------+
| Nextcloud name | Display Name | LDAP UID | LDAP DN | Last Login | Dir | Sharer |
+----------------+--------------+----------+---------+------------+-----+--------+
I need to wait a little more probably, guys have seen deleted users appear after a while