Cannot connect to LDAP Server

Nextcloud version :12
Operating system and version :Ubuntu 16.04
PHP version :PHP 7.0
I cannot configure ldap authentication. Iā€™m using Active Directory on Windows Server 2012

when click on Detect Base DN, I got ā€œBase DN could not be auto-detected, please revise credentials, Host and portā€ message error, while this setting worked on owncloud.

The output of your Nextcloud log in Admin > Logging:
Configuration Error (prefix ): login filter does not contain %uid place holder.
Warning user_ldap Configuration Error (prefix ): No LDAP Login Filter given!

#The output of your config.php file information

<?php $CONFIG = array ( 'instanceid' => '********', 'passwordsalt' => '**********', 'secret' => '*********', 'trusted_domains' => array ( 0 => '192.168.0.50'', ), 'datadirectory' => '/var/www/html/nextcloud/data', 'overwrite.cli.url' => 'https://192.168.0.50', 'dbtype' => 'mysql', 'version' => '12.0.0.29', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '***************', 'dbpassword' => '****************', 'logtimezone' => 'UTC', 'installed' => true, 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => '\OCA\User_LDAP\LDAPProviderFactory', );

I found whatā€™s problem but i donā€™t know how can i resolve it.
In our environment we used Microsoft certificate authority service
In our laborator i installed other domain without Microsoft Certificate Authority Service and ldap from Nextcloud connected to the new domain.

Do you use Kerberos internally?

Hello JasonBayton
yes I do

Sounds like that is the problem then. If your network is Kerberos and LDAP isnā€™t setup for basic authentication (rather is expecting a cert) then it makes sense connection is refused.

I donā€™t know if NC supports Kerberos, might be one for @jospoortvliet. But that would potentially explain the problem and why it works on another LDAP likely just using basic authentication.

I installed ldap-utils package and then test bellow command.
ldapsearch -x -b ā€œdc=hedco,dc=comā€ -D "fuser@hedco.com" -h 192.168.0.1 -W ā€˜(&(proxyAddresses=smtp*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))ā€™

result:
ldap_bind: Strong(er) authentication required (8)
additional info: 00002028: LdapErr: DSID-0C090202, comment: The server requires binds to turn on integrity checking if SSL\TLS are not already active on the connection, data 0, v2580

We support Kerberos and all I know about it is that it works via apache modules using the user_saml appā€¦ Thatā€™s where my knowledge ends, sorry. We have implemented it for the TU Berlin, though, so the techies know how/what and if this is for a university or company I suggest to contact sales@nextcloud.com for a support contract. Weā€™ve got very low prices for education :see_no_evil:

LDAPs perhaps?

Hello guys
Then verify thatā€™s problem I found a problem in our active directory registry server
ldapserverintegrity key value set is 2.
when ldapserverintegrity valus set is 2,That means enforces all LDAP authentication to be secured with SSL.
know please tell me how can I configure ldaps in nextcloud.

Host= ldaps://1.1.1.1

I could connect from Nextcloud to ldap server via 389 port.
know I want connect to 636 port
Our ldaps configuration is worked on our PaperCut App (Itā€™s a print management Application)
But in Nextcloud itā€™s not worked.

Donā€™t anyone help me?

Have you tried detecting the baseDN instead? Have you checked the logs on the LDAP server to confirm connections are being made?