ldap authentication does not allow empty Base DN
the Base DN should be allowed to be left blank on the LDAP Basic authentication information.
To enable this, the Base DN check has to be removed on line 283 of apps/user_ldap/lib/connection.php and !empty($this->connection->ldapBaseUsers) must be added to the if statement of line 225 of apps/user_ldap/lib/access.php (in function dn2username).
there are many situations where a global search across all DNs is required -- in our case, we have multiple domain name names on different TLDs.
This is not possible. We need to pass a starting point to LDAP when doing a search. You are probably more interested in this request https://github.com/owncloud/core/issues/395
Hi, when i modified the code as above and everything works properly. why is it impossible?
Okay, took a closer look. First, an empyt base is undocumented in the PHP documentation. But it looks to be fine.
A catch is that if the base dn is left empty, the BASE entry in ldap.conf is being used. We do not know what is written there, making it a source of failure. You will need to configure this as well, either by specifying the base DN or assure it is empty.
Because of this error prone config situation, I do not like it. On the other hand I see your scenario. I reopen it and mark the issue as enhancement.
Once more: with an empty base DN, only the DSE will be searched, which is also dependent on the scope used. A normal search would be done in the base scope, but the search works with subtree scope. In this case, an error code will be returned: no such object (32).
So why do you changes work for you? Maybe because of what is in the /etc/ldap/ldap.conf of your server running ownCloud?
Atm, I rather refrain from including it, but I am open for further arguments.
Closed for inactivity.