Main AD: 7.8-2003 fully updated with subscription
installed Machine: 7.8-2003 fully updated no subscription - fresh install from scartch with iso.
Module: NC 19.0.3
I hit the following problem, which is possibly a bug.
I installed a “colabrativ server” as a seperate instance (proxmox-vm), which I joined to the main-AD.
When I installed NC on this instance siganl-event nethserver-nextclout-update failed.
More precise the S30nethserver-nextcloud-occ-conf command failed.
When trying to login, I got an internal server error.
This behaviour I encountered unless I installed NC bevor or after I joined the machine to the AD.
Tried it twice, but bothtimes same error, as soon the machine is joined.
I had to install NC without selecting an accountprovider and than do the LDAP-config manually in NC over ladps on port 636. Then I got the users from the Main-LDAP.
A lot of people think NextCloud in NethServer “can do” AD authentification, so it must react like a Windows App installed on a “Member Server” - All Users and Groups are visible. NO !!!
This thinking may be valid for a lot of stuff, but not NextCloud…
NextCloud uses it’s own connection to AD, this fails in NethServer as - this bit I’m assuming (I’m not a NethServer developer and haven’t checked the specs) - I think it checks: Is there an account provider, and if yes, uses localhost or something similiar. This is not correct, but the behaviour is understandable.
NethServer wasn’t designed for a Multi-Server environment. Even though it works well, there are a few caveats and “gotchas”…
I’m NOT saying this behaviour can’t be improved, I’m just saying this behaviour is almost expected, but not BAD per se…
I do admit being a NethServer fan, but if I need something special from it, I’m willing to do manual tweaks to get there!
Yes, this behaviour isn’t bad per se. To do manual work is o.k. But in this case, the docs should provide info.
NC is a module which is installable in softwarecenter and as this, I assumed it to work out of the box.
As it didn’t, I read the docs twice but coudn’t get it to work. If there was an info about difficulties with AD and to bind it manually, I would have saved a lot of time.
The funny thing is, I found every info I needed in the file “S30nethserver-nextcloud-occ-conf” exept of the ldaps-hint on port 636.
I think I’ll write a “how to bind NC to a reomte NS-AD” the next days.
I think Nethserver just defaults to ldap:// but for remote AD with NC ldaps:// is needed. Maybe it’s the Nextcloud LDAP/AD implementation that does not support STARTTLS…
EDIT: this is when using ldap://IP-of-ADserver and STARTTLS checked
When using ldaps://IP-of-ADserver and STARTTLS uncheck it works again.
Seems that STARTTLS is the problem resp. not supported by NC.
AFAIK NextCloud LDAP client is based on PHP/OpenLDAP libraries, that support STARTTLS for sure.
AFAIR NextCloud used to support remote account providers, whatever their configuration is. I might be wrong, of course but time and commits has passed and there can be something new in between, so it requires further information and analysis.
Can you see any additional detail in /var/lib/nethserver/nextcloud/*.log?
Please check the NC LDAP config with
occ ldap:show-config
If you changed the LDAP config from the NC admin page, it’s possible that you have a misalignment between NS configuration and what is applied to NC.
I think Nextcloud should use the same values as configured in Nethserver instead of hardcoded disabling of STARTTLS.
This way it will work with remote Neth/Samba AD and MS AD out of the box…
I don’t remember why… The comment says # always disable starttls, AD does not support it …but that’s not true now. I know @nrauso has a procedure that enables ldaps:// and ldap://+StartTLS on Windows AD Server 2008. Am I right Nicola?
I agree NC has to honor the system-wide configuration. Furthermore, forcibly disabling StartTLS is dangerous because it exposes passwords in clear text
However enabling it on existing systems is dangerous too, because it forces a new configuration - never touch a running system
If we decide to fix, we must preserve existing setups, as usual…
do not change LDAP setup with NC admin UI!
As workaround I’d do the following:
go to the System > Users & Groups > Edit provider dialog as root user,
disable StartTLS
set protocol ldaps://
If AD is configured with a TLS certificate, the new settings are saved and applied to NC too!