{"action":"created","issue":{"url":"https://api.github.com/repos/nextcloud/server/issues/272","repository_url":"https://api.github.com/repos/nextcloud/server","labels_url":"https://api.github.com/repos/nextcloud/server/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/server/issues/272/comments","events_url":"https://api.github.com/repos/nextcloud/server/issues/272/events","html_url":"https://github.com/nextcloud/server/issues/272","id":163319889,"number":272,"title":"LDAP Users not mapped and authentication fails","user":{"login":"EgoAleSum","id":43508,"avatar_url":"https://avatars.githubusercontent.com/u/43508?v=3","gravatar_id":"","url":"https://api.github.com/users/EgoAleSum","html_url":"https://github.com/EgoAleSum","followers_url":"https://api.github.com/users/EgoAleSum/followers","following_url":"https://api.github.com/users/EgoAleSum/following{/other_user}","gists_url":"https://api.github.com/users/EgoAleSum/gists{/gist_id}","starred_url":"https://api.github.com/users/EgoAleSum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EgoAleSum/subscriptions","organizations_url":"https://api.github.com/users/EgoAleSum/orgs","repos_url":"https://api.github.com/users/EgoAleSum/repos","events_url":"https://api.github.com/users/EgoAleSum/events{/privacy}","received_events_url":"https://api.github.com/users/EgoAleSum/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nextcloud/server/labels/bug","name":"bug","color":"ee0701"},{"url":"https://api.github.com/repos/nextcloud/server/labels/feature:%20ldap","name":"feature: ldap","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-01T05:02:44Z","updated_at":"2016-07-18T11:17:46Z","closed_at":null,"body":"I'm setting up a new OC 9.0.51 server connected to LDAP. I was able to get LDAP to work and it sees two users in my Active Directory when pressing on the \"test\" buttons, as expected. There is nothing \"fancy\" about my LDAP setup: just adding basic settings.\r\n\r\nAll tests run fine:\r\n1. \"Verify settings and count users\" show me 2 users found in the only group that is allowed (Ok)\r\n2. Login is only with \"LDAP / AD Username:\". I tested with the usernames of both users (*john* and *jane*) and in both cases pressing on \"Verify settings\" reports \"User found and settings verified.\" (Ok)\r\n\r\nHowever, in the \"Users\" admin section I can only see 1 user imported from AD (the *jane* user). *john* was not imported, not even after pressing on \"Clear Username-LDAP User Mapping\".\r\n\r\nWhen trying to log in as *john* (the user not imported), the UI reports: \"An internal error occurred. Please try again or contact your administrator\"). I then see the following 3 error messages in the log:\r\n\r\n```json\r\n{\"reqId\":\"1kqA\\/gf7n2Vv05GiFFQR\",\"remoteAddr\":\"172.17.0.4\",\"app\":\"PHP\",\"message\":\"iconv(): Wrong charset, conversion from `UTF-8' to `ASCII\\/\\/TRANSLIT' is not allowed at \\/nextcloud\\/apps\\/user_ldap\\/lib\\/access.php#1101\",\"level\":3,\"time\":\"2016-07-01T04:48:23+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n\r\n{\"reqId\":\"1kqA\\/gf7n2Vv05GiFFQR\",\"remoteAddr\":\"172.17.0.4\",\"app\":\"core\",\"message\":\"Exception when running cache gc: Attempted to initialize mount points for null user and no user in session\",\"level\":2,\"time\":\"2016-07-01T04:48:23+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n\r\n{\"reqId\":\"1kqA\\/gf7n2Vv05GiFFQR\",\"remoteAddr\":\"172.17.0.4\",\"app\":\"handleLogin\",\"message\":\"Exception: {\\\"Exception\\\":\\\"OC\\\\\\\\User\\\\\\\\NoUserException\\\",\\\"Message\\\":\\\"Attempted to initialize mount points for null user and no user in session\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0 \\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/node\\\\\\/root.php(336): OC\\\\\\\\Files\\\\\\\\Filesystem::initMountPoints('')\\\\n#1 \\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/server.php(742): OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\Root->getUserFolder('')\\\\n#2 \\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/user.php(170): OC\\\\\\\\Server->getUserFolder('')\\\\n#3 \\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1150): OC_User::login(*** username and password replaced ***)\\\\n#4 \\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1046): OC::tryFormLogin()\\\\n#5 \\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1008): OC::handleLogin()\\\\n#6 \\\\\\/nextcloud\\\\\\/index.php(39): OC::handleRequest()\\\\n#7 {main}\\\",\\\"File\\\":\\\"\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/filesystem.php\\\",\\\"Line\\\":377}\",\"level\":3,\"time\":\"2016-07-01T04:48:23+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n```\r\n\r\nWhen trying to log in as *jane* (the user that was imported), instead, the authentication succeeds, but then I see a completely white page. On the logs, I see:\r\n\r\n```json\r\n{\"reqId\":\"wvelxJoRPN+nxRh3E21h\",\"remoteAddr\":\"172.17.0.4\",\"app\":\"PHP\",\"message\":\"Error: Call to a member function getFileInfo() on null at \\/nextcloud\\/lib\\/private\\/files\\/filesystem.php#874\",\"level\":3,\"time\":\"2016-07-01T04:52:37+00:00\",\"method\":\"GET\",\"url\":\"\\/index.php\\/apps\\/files\\/\",\"user\":\"--\"}\r\n```\r\n\r\nI'm running OC using the Docker image by @Wonderfall : https://github.com/Wonderfall/dockerfiles/tree/master/nextcloud\r\n\r\n### Server configuration\r\n**Operating system**:\r\nAlpine Linux in Docker Container\r\n\r\n**Web server:**\r\nnginx\r\n\r\n**Database:**\r\nMariaDB 10.1\r\n\r\n**PHP version:**\r\n7.0.4\r\n\r\n**Nextcloud version:** (see Nextcloud admin page)\r\n9.0.51\r\n\r\n**Updated from an older Nextcloud/ownCloud or fresh install:**\r\nFresh install\r\n\r\n**Where did you install Nextcloud from:**\r\nDocker: https://github.com/Wonderfall/dockerfiles/tree/master/nextcloud\r\n\r\n**Signing status (Nextcloud 9.0 and above):**\r\n\r\n```\r\nNo errors have been found.\r\n```\r\n\r\n**List of activated apps:**\r\n\r\n```\r\nEnabled:\r\n  - activity: 2.2.1\r\n  - admin_audit: 1.0.0\r\n  - comments: 0.2\r\n  - dav: 0.1.6\r\n  - federatedfilesharing: 0.1.0\r\n  - files: 1.4.4\r\n  - files_pdfviewer: 0.8.1\r\n  - files_sharing: 0.9.1\r\n  - files_texteditor: 2.1\r\n  - files_trashbin: 0.8.0\r\n  - files_versions: 1.2.0\r\n  - files_videoplayer: 0.9.8\r\n  - firstrunwizard: 1.1\r\n  - gallery: 14.5.0\r\n  - notifications: 0.2.3\r\n  - provisioning_api: 0.4.1\r\n  - systemtags: 0.2\r\n  - templateeditor: 0.1\r\n  - updatenotification: 0.1.0\r\n  - user_ldap: 0.8.0\r\nDisabled:\r\n  - encryption\r\n  - external\r\n  - federation\r\n  - files_external\r\n  - user_external\r\n```\r\n\r\n**The content of config/config.php:**\r\n\r\n```\r\n{\r\n    \"system\": {\r\n        \"instanceid\": \"ocqua46unikg\",\r\n        \"passwordsalt\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"secret\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"trusted_domains\": [\r\n            \"10.1.2.2\",\r\n            \"some.domain\"\r\n        ],\r\n        \"datadirectory\": \"\\/nextcloud\\/data\",\r\n        \"overwrite.cli.url\": \"http:\\/\\/10.1.2.2\",\r\n        \"dbtype\": \"mysql\",\r\n        \"version\": \"9.0.51.0\",\r\n        \"dbname\": \"owncloud\",\r\n        \"dbhost\": \"mariadb\",\r\n        \"dbtableprefix\": \"oc_\",\r\n        \"dbuser\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"dbpassword\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"logtimezone\": \"UTC\",\r\n        \"installed\": true,\r\n        \"mail_smtpmode\": \"smtp\",\r\n        \"mail_from_address\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"mail_domain\": \"sendgrid.net\",\r\n        \"mail_smtpauthtype\": \"LOGIN\",\r\n        \"mail_smtpsecure\": \"tls\",\r\n        \"mail_smtphost\": \"smtp.sendgrid.net\",\r\n        \"mail_smtpport\": \"587\",\r\n        \"mail_smtpauth\": 1,\r\n        \"mail_smtpname\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"mail_smtppassword\": \"***REMOVED SENSITIVE VALUE***\",\r\n        \"ldapIgnoreNamingRules\": false\r\n    }\r\n}\r\n```\r\n\r\n**Are you using external storage, if yes which one:** Local\r\n\r\n**Are you using encryption:** No\r\n\r\n**Are you using an external user-backend, if yes which one:** Active Directory (LDAP)\r\n\r\n#### LDAP configuration (delete this part if not used)\r\n\r\n```\r\n+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+\r\n| Configuration                 |                                                                                                                                    |\r\n+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+\r\n| hasMemberOfFilterSupport      | 1                                                                                                                                  |\r\n| hasPagedResultSupport         |                                                                                                                                    |\r\n| homeFolderNamingRule          |                                                                                                                                    |\r\n| lastJpegPhotoLookup           | 0                                                                                                                                  |\r\n| ldapAgentName                 | CN=LDAP User,CN=Users,DC=domain,DC=com                                                                                          |\r\n| ldapAgentPassword             | ***                                                                                                                                |\r\n| ldapAttributesForGroupSearch  |                                                                                                                                    |\r\n| ldapAttributesForUserSearch   |                                                                                                                                    |\r\n| ldapBackupHost                |                                                                                                                                    |\r\n| ldapBackupPort                |                                                                                                                                    |\r\n| ldapBase                      | CN=Users,DC=domain,DC=com                                                                                                       |\r\n| ldapBaseGroups                | CN=Users,DC=domain,DC=com                                                                                                       |\r\n| ldapBaseUsers                 | CN=Users,DC=domain,DC=com                                                                                                       |\r\n| ldapCacheTTL                  | 600                                                                                                                                |\r\n| ldapConfigurationActive       | 1                                                                                                                                  |\r\n| ldapDynamicGroupMemberURL     |                                                                                                                                    |\r\n| ldapEmailAttribute            |                                                                                                                                    |\r\n| ldapExperiencedAdmin          | 0                                                                                                                                  |\r\n| ldapExpertUUIDGroupAttr       |                                                                                                                                    |\r\n| ldapExpertUUIDUserAttr        |                                                                                                                                    |\r\n| ldapExpertUsernameAttr        |                                                                                                                                    |\r\n| ldapGroupDisplayName          | cn                                                                                                                                 |\r\n| ldapGroupFilter               | (&(|(objectclass=group))(|(cn=Home Users)))                                                                                        |\r\n| ldapGroupFilterGroups         | Home Users                                                                                                                         |\r\n| ldapGroupFilterMode           | 0                                                                                                                                  |\r\n| ldapGroupFilterObjectclass    | group                                                                                                                              |\r\n| ldapGroupMemberAssocAttr      | uniqueMember                                                                                                                       |\r\n| ldapHost                      | dc01.domain.com                                                                                                               |\r\n| ldapIgnoreNamingRules         |                                                                                                                                    |\r\n| ldapLoginFilter               | (&(&(|(objectclass=person))(|(|(memberof=CN=Home Users,CN=Users,DC=domain,DC=com)(primaryGroupID=1106))))(samaccountname=%uid)) |\r\n| ldapLoginFilterAttributes     |                                                                                                                                    |\r\n| ldapLoginFilterEmail          | 0                                                                                                                                  |\r\n| ldapLoginFilterMode           | 0                                                                                                                                  |\r\n| ldapLoginFilterUsername       | 1                                                                                                                                  |\r\n| ldapNestedGroups              | 0                                                                                                                                  |\r\n| ldapOverrideMainServer        |                                                                                                                                    |\r\n| ldapPagingSize                | 500                                                                                                                                |\r\n| ldapPort                      | 389                                                                                                                                |\r\n| ldapQuotaAttribute            |                                                                                                                                    |\r\n| ldapQuotaDefault              |                                                                                                                                    |\r\n| ldapTLS                       | 0                                                                                                                                  |\r\n| ldapUserDisplayName           | displayName                                                                                                                        |\r\n| ldapUserDisplayName2          |                                                                                                                                    |\r\n| ldapUserFilter                | (&(|(objectclass=person))(|(|(memberof=CN=Home Users,CN=Users,DC=domain,DC=com)(primaryGroupID=1106))))                         |\r\n| ldapUserFilterGroups          | Home Users                                                                                                                         |\r\n| ldapUserFilterMode            | 0                                                                                                                                  |\r\n| ldapUserFilterObjectclass     | person                                                                                                                             |\r\n| ldapUuidGroupAttribute        | auto                                                                                                                               |\r\n| ldapUuidUserAttribute         | auto                                                                                                                               |\r\n| turnOffCertCheck              | 0                                                                                                                                  |\r\n| useMemberOfToDetectMembership | 1                                                                                                                                  |\r\n+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+\r\n```\r\n\r\n### Client configuration\r\n**Browser:** Tested with multiple evergreen browsers\r\n\r\n**Operating system:** Windows 10, OSX\r\n\r\n### Logs\r\n#### Web server error log\r\nNot available (and not applicable!)\r\n\r\n#### Nextcloud log (data/owncloud.log)\r\nSee above\r\n"},"comment":{"url":"https://api.github.com/repos/nextcloud/server/issues/comments/233302682","html_url":"https://github.com/nextcloud/server/issues/272#issuecomment-233302682","issue_url":"https://api.github.com/repos/nextcloud/server/issues/272","id":233302682,"user":{"login":"jokoso","id":1613459,"avatar_url":"https://avatars.githubusercontent.com/u/1613459?v=3","gravatar_id":"","url":"https://api.github.com/users/jokoso","html_url":"https://github.com/jokoso","followers_url":"https://api.github.com/users/jokoso/followers","following_url":"https://api.github.com/users/jokoso/following{/other_user}","gists_url":"https://api.github.com/users/jokoso/gists{/gist_id}","starred_url":"https://api.github.com/users/jokoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jokoso/subscriptions","organizations_url":"https://api.github.com/users/jokoso/orgs","repos_url":"https://api.github.com/users/jokoso/repos","events_url":"https://api.github.com/users/jokoso/events{/privacy}","received_events_url":"https://api.github.com/users/jokoso/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T11:17:46Z","updated_at":"2016-07-18T11:17:46Z","body":"I have a similar problem running from the same docker image.\r\n\r\nDetails:\r\n- I have two AD users that are identified in the LDAP wizard (e.g., \"Jon\" and \"Lou\").\r\n- Only Lou shows up under \"Users\".\r\n- Lou can log in.\r\n- When Jon attempts to log in, he gets the \"An internal error occurred...\" message.\r\n- _Any_ users trying to immediately log in after the error message is shown gets the white page mentioned above.\r\n- The only way to get past the white page is resetting the browser cache.\r\n\r\nHere's the log output:\r\n\r\n```\r\n{\"reqId\":\"VOEfsrck0nRL1jreHq4o\",\"remoteAddr\":\"1.2.3.4\",\"app\":\"admin_audit\",\"message\":\"Login attempt: \\\"jon\\\"\",\"level\":1,\"time\":\"2016-07-18T10:37:40+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n{\"reqId\":\"VOEfsrck0nRL1jreHq4o\",\"remoteAddr\":\"1.2.3.4\",\"app\":\"admin_audit\",\"message\":\"Login successful: \\\"\\\"\",\"level\":1,\"time\":\"2016-07-18T10:37:41+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n{\"reqId\":\"VOEfsrck0nRL1jreHq4o\",\"remoteAddr\":\"1.2.3.4\",\"app\":\"core\",\"message\":\"Exception when running cache gc: Attempted to initialize mount points for null user and no user in session\",\"level\":2,\"time\":\"2016-07-18T10:37:41+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n{\"reqId\":\"VOEfsrck0nRL1jreHq4o\",\"remoteAddr\":\"1.2.3.4\",\"app\":\"handleLogin\",\"message\":\"Exception: {\\\"Exception\\\":\\\"OC\\\\\\\\User\\\\\\\\NoUserException\\\",\\\"Message\\\":\\\"Attempted to initialize mount points for null user and no user in session\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0 \\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/node\\\\\\/root.php(336): OC\\\\\\\\Files\\\\\\\\Filesystem::initMountPoints('')\\\\n#1 \\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/server.php(756): OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\Root->getUserFolder('')\\\\n#2 \\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/user.php(170): OC\\\\\\\\Server->getUserFolder('')\\\\n#3 \\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1167): OC_User::login(*** username and password replaced ***)\\\\n#4 \\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1063): OC::tryFormLogin()\\\\n#5 \\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1025): OC::handleLogin()\\\\n#6 \\\\\\/nextcloud\\\\\\/index.php(39): OC::handleRequest()\\\\n#7 {main}\\\",\\\"File\\\":\\\"\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/filesystem.php\\\",\\\"Line\\\":377}\",\"level\":3,\"time\":\"2016-07-18T10:37:41+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n{\"reqId\":\"VOEfsrck0nRL1jreHq4o\",\"remoteAddr\":\"1.2.3.4\",\"app\":\"user_ldap\",\"message\":\"No DN found for jon on mydomain.com\",\"level\":0,\"time\":\"2016-07-18T10:37:41+00:00\",\"method\":\"POST\",\"url\":\"\\/\",\"user\":\"--\"}\r\n```"}}
{"actor":{"display_login":"jokoso"}}