Server: LDAP mail attribute of users not updated in NextCloud data (primary email)

Created on 11 Feb 2018  Â·  3Comments  Â·  Source: nextcloud/server

I am using OpenLDAP to maintain the users of our communities. We noticed that people did not set their mail before first login on nextcloud. They noticed their mistake and inserted a primary email addres. The mail attribute is now properly set. But Nextcloud fails to update the new information from ldap.

Steps to reproduce

  1. Enter user in LDAP
  2. First user login on Nextcloud
  3. User notices that email is not set
  4. User is adding primary email on ldap
  5. Nextcloud is not updating the email attribute

Expected behaviour

If primary email attribute is added (or changed - modification is untested right now), Nextcloud is not updating the information. Alike the avatar (image), people should be able to maintain their data and Nextcloud should update these data.

Actual behaviour

No update of the mail attribute using LDAP auth.

Server configuration

Operating system: debian stretch

Web server: Apache 2.4 behind NGINX reverse proxy (NGINX proxy running on debian lenny)

Database: MariaDB

PHP version: 7

Nextcloud version: 12.0.5

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Signing status:


Signing status

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:


App list

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:


Config report

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)


LDAP config

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log


Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)


Nextcloud log

Insert your Nextcloud log here

Browser log


Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

ldap

Most helpful comment

Hey been banging my head into desk for a few days trying to figure this out. I hope this helps the next guy... "Nextcloud12" Assuming you already have LDAP setup and working but there is no email address pulled from AD and you cannot add it under users or in personal. to fix this from web browser go to admin>LDAP/AD>select the advanced tab (top right)>expand "Special Attributes" under email field enter, "mail" leave off the "" just type mail. might have to wait a few mins but afterwards the email address is now pulled from AD. this step wasnt needed in version 9 or 10 of nextcloud but is need in 12 dont know about 13 yet. good luck!

All 3 comments

Provided the mail attribute is being set in LDAP, it is also being updated. But this can take up to 10min (default cache ttl).

Hey been banging my head into desk for a few days trying to figure this out. I hope this helps the next guy... "Nextcloud12" Assuming you already have LDAP setup and working but there is no email address pulled from AD and you cannot add it under users or in personal. to fix this from web browser go to admin>LDAP/AD>select the advanced tab (top right)>expand "Special Attributes" under email field enter, "mail" leave off the "" just type mail. might have to wait a few mins but afterwards the email address is now pulled from AD. this step wasnt needed in version 9 or 10 of nextcloud but is need in 12 dont know about 13 yet. good luck!

Hey been banging my head into desk for a few days trying to figure this out. I hope this helps the next guy... "Nextcloud12" Assuming you already have LDAP setup and working but there is no email address pulled from AD and you cannot add it under users or in personal. to fix this from web browser go to admin>LDAP/AD>select the advanced tab (top right)>expand "Special Attributes" under email field enter, "mail" leave off the "" just type mail. might have to wait a few mins but afterwards the email address is now pulled from AD. this step wasnt needed in version 9 or 10 of nextcloud but is need in 12 dont know about 13 yet. good luck!

I also had to do this on nextcloud 15.0.5 . The email address was loaded immediately with a logout and login. LDAP service was Windows Server 2012R2 AD. I am aware this does not exactly match the original report.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChristophWurst picture ChristophWurst  Â·  3Comments

MorrisJobke picture MorrisJobke  Â·  3Comments

blackcrack picture blackcrack  Â·  3Comments

georgehrke picture georgehrke  Â·  3Comments

mfechner picture mfechner  Â·  3Comments