Provisioning tokens for LDAP users


We are deploying Nextcloud in our organization, and wish to automount the DavFS across our compute cluster.

For this we figure we need to generate auth tokens on behalf of the LDAP users, and use these for mounting per-user mounts with mount.davfs(8).

To avoid having every user manually having to create a token for this, we’d like to provision these automatically. This means either (I) populating the oc_authtokens table with data generated by us, or (II) hooking into some API somewhere, generating tokens on the users behalf.

Does anyone have any pointers as to achieve either (I) or (II)? Preferably without too much PHP coding on our part… :wink:


Nextcloud version: 12.0.4
Operating system and version: CentOS 7.4
Apache or nginx version: Apache 2.4.6
PHP version: 7.1.13

any news on this?

I had the same question, ldap users combined with 2fa. I have not gotten around to completing a solution but the info might help.