Nextcloud with AD backend, User deleted in AD without unsharing calendar, calendar can not be removed or unshared anymore…
Trying to unshare the displayed calendar results in a non-descriptive error.
dav:delete-calendar [--birthday] [-f|--force] <uid> [<name>] deletes the
calendar named name (or the birthday calendar if --birthday is
specified) of the user uid. You can use the force option -f or --force to delete the calendar instead of moving it to the trashbin.
This example will delete the calendar mollycal of user molly::
It’s annoying (I thought it might be the case) I don’t personally like OCC (I use it when I have to) but couldn’t think of an easier way (especially when you require a user to remove a protected “asset” when that user has been removed or privilege recinded) at least it’s a place to start rather than messing with db files
OCC is one of the remnants of Owncloud still not purged - and probably never will…
It’s too important and well established - kinda like using mysql / mysqldump to handle mariadb…
I agree if they remove it they would have to replace it with something else which imo would be just reinventing the wheel and although a clean up of the code so it only uses nextcloud related data would be great it would probably be difficult as they might break 3rd party add-ons
I still can’t get rid of the shared calendar as the commands to show calendars by that user or to delete calendars from that user only shows “user unknown”…
The user actually was deleted in AD, as intended. I did not expect a shared calendar to be unremoveable…
I do not have any Nextclouds on NethServer using LDAP (All my clients and I myself need AD…), but if it is replicatable in LDAP too, I think I’ve found a serious bug…
If a user is removed, the users shared calendar (and maybe other objects) should still be removeable…
I don’t know… instead of the username can you try with the internal codename or uid, if available?
the one you get with occ user:list, if still present
last time I tried it didn’t work. Here in the forum there are some comments by Steph and me regarding what shall be needed to use it (specifying the new service port…)
All these workarounds needed because Centos7 has such old versions…
It’s really about time for a newer basis - the code-bloat is one of the major disadvantages of LTS systems…
Despite all occ comands, the shared calendar could NOT be removed from being displayed in other users calendars. The main problem: The user was deleted / can’t be found…
The solution which works - and also shows that a backup too many is better than one too little…
The environment is running on Proxmox, with backups on a PBS.
AD is a seperate NethServer from the Nextcloud-NethServer, making this more difficult to solve just using Nextclouds options.
Created a current backup of NethServer AD on PBS (To restore if successful!).
Shutting down the AD and restoring the version from a day before the usewr was deleted.
Logging into Nextcloud as that user who shared the calendar and removing the share.
Loging out and verifying with my own user if that users shared calendar still showed up. It didn’t!
Logged out of Nextcloud.
Shut down NethServer AD.
Restore the last backup from PBS.
Everything works!
User shared calendar is gone!
Success !
A few notes:
If this was a real Windows environment with a Windows AD, and a Windows member running AD, I’d probably have had to remove the Nextcloud-NethServer from AD and then reboot and re-add it to AD. Windows changes the “join” password often in the background.
With NethServer, despite the deletion being 5 weeks back, this wasn’t needed.
This was very frustrating - if I had known the solution was so easy…
It was one of the reasons I separated the AD from the rest in the first place!