LDAP attribute mapping

Here’s another thread about a similar issue:

Maybe we should fix this and add a db prop to disable the default config to make remote LDAP joins more flexible?

As a workaround you could use a custom config (for instance s02 copied from the NethServer one) by adding an event that disables the s01 config used by autoconfiguration.

Create an action script /etc/e-smith/events/actions/nethserver-nextcloud-occ-conf-disable with following content:

occ ldap:set-config s01 ldapConfigurationActive 0

Make it executable:

chmod +x /etc/e-smith/events/actions/nethserver-nextcloud-occ-conf-disable

Add the action to the events by creating symlinks:

ln -s ../actions/nethserver-nextcloud-occ-conf-disable /etc/e-smith/events/nethserver-nextcloud-update/S31nethserver-nextcloud-occ-conf-disable

ln -s ../actions/nethserver-nextcloud-occ-conf-disable /etc/e-smith/events/nethserver-nextcloud-save/S31nethserver-nextcloud-occ-conf-disable

Apply the config:

signal-event nethserver-nextcloud-update

Now config s01 is disabled and your custom config should work if enabled.

This workaround should also work when NC is updated.

If something breaks, just remove the created files and symlinks and run signal-event nethserver-nextcloud-update

2 Likes