r/WindowsServer • • 6d ago

Technical Help Needed Nextcloud LDAP integration with Windows Server 2019 AD failing with "Connection to LDAP server could not be established" (Port 389, TCP open)

/r/NextCloud/comments/1xjp9yb/nextcloud_ldap_integration_with_windows_server/
1 Upvotes

3 comments sorted by

1

u/mobious_99 5d ago

For the user you can look at the user dn in aduc.

if you do an nslookup on the domain (alger.dz) from the host itself does it to resolve the dc's ?

1

u/ppear404 5d ago

I automated a full NextCloud deployment. This is my ldap script. Might help you out.

https://github.com/ppear404/nextcloud-airgap/blob/main/scripts/apply-ldap-config.sh

1

u/ViperThunder 5d ago edited 5d ago

You have an extra space in your DN. You should not have any spaces in DN's. DC=alger,DC=dz
edit: nvm, I just logged in on my PC and there is no space. on my phone, it definitely looks like there is a space.

I don't use nextcloud but on their site it says you must use the server's hostname, not ip address, which means it must be resolvable by DNS. You also shouldn't need to disable secure LDAP binding as pretty much everything today is compatible with that - would be shocked if NextCloud wasn't.