Ticket #4079 (closed defect: fixed)
Unable to bind to LDAP in Mail module
| Reported by: | jjdejong@… | Owned by: | jamor@… |
|---|---|---|---|
| Milestone: | 3.0 | Component: | users |
| Severity: | major | Keywords: | |
| Cc: |
Description
slapd seems to be running on the wrong port. ps reports slapd running on port 390, with a weird host IP address:
17681 ? Ssl 0:00 /usr/sbin/slapd -d 0 -h ldap://0.0.0.0:390/ ldapi://%2fvar%2frun%2fslapd%2fldapi/????x-mod=0777 -u openldap -g openldap -F /etc/ldap/slapd.d/
Thus postfix can't connect when trying to send mail. My mail.log is full of:
postfix/cleanup[17581]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 with dn cn=
Changing parameter SLAPD_SERVICES in /etc/default/slapd and bouncing slapd doesn't seem to fix things.
Attachments
Change History
comment:2 Changed 14 months ago by jjdejong@…
- Severity changed from normal to major
All ldap searches fail with "Error 32: no such object". Something is broken with the openldap configuration.
comment:3 Changed 14 months ago by jamor@…
Hello Jjdejong,
do you refer to all LDap searches or only to mail-related ones?
comment:4 Changed 14 months ago by jamor@…
- Status changed from new to closed
- Resolution set to fixed
Hello again,
i just shaw that this is already fixed in [dac07ce408] . The slapd was running as intended, it was the mail module which was not synchronized to this changes, so I advise you to change back the port.
The fix is not released yet, but if you want to hotfix your self, here is the overview of the commit -> http://git.zentyal.org/zentyal.git/commit/dac07ce408285c46891bb438969d21cb2c78d14d
Regards,
Javier
comment:5 Changed 14 months ago by jjdejong@…
- Status changed from closed to reopened
- Resolution fixed deleted
OK, I changed the port back to 390 and updated /etc/postfix/main.cf. I still get this when attempting to send email (the port is correct now):
warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:390 with dn cn=zentyal,dc=mydomain,dc=local: 2 (Protocol error) warning: ldap:valiases lookup error for "xxx" warning: E52DA43404CF: virtual_alias_maps map lookup problem for xxx -- deferring delivery
Plus ldapsearch using port 390 doesnt work either:
ldapsearch -x -h localhost:390 -b "dc=mydomain,dc=local" uid=*
Returns "32 No such object"
Changed 14 months ago by jjdejong@…
-
attachment
Zentyal-2.2.png
added
Anonymous connection to LDAP structure in Zentyal 2.2 - base DN visible
Changed 14 months ago by jjdejong@…
-
attachment
Zentyal-2.3beta.png
added
Anonymous connection to LDAP structure in Zentyal 2.3 - base DN NOT visible
comment:6 Changed 14 months ago by jamor@…
Answer from jjdejong:
Hola Javier, I couldn't check this fix, because now I can't manage to reinstall the zentyal-users package - apt-get spits configuration errors. I guess I need to uninstall a few other packages and wipe the configuration files. But the purpose of my email is to question why a non-standard port is being used for LDAP - none of the standard tools works now with the default settings, like ldapsearch, ldapadd, etc. --JJJ
comment:7 Changed 14 months ago by jamor@…
- Status changed from reopened to closed
- Resolution set to fixed
Hello Jjdejon,
the reason is that we are shipping samba4 which uses its own LDAP implementation. We found that was easier to us move the openldap port than the samba4 LDAP port.
Another thing, you don't need to use https://trac.zentyal.org , the SSL version is for developers with zentyal certificates, you can access almost all sections using plain HTTP , http://trac.zentyal.org
Regards,
Javier
comment:8 Changed 14 months ago by jjdejong@…
- Status changed from closed to reopened
- Resolution fixed deleted
comment:9 Changed 14 months ago by jamor@…
- Status changed from reopened to closed
- Resolution set to fixed
Hello Jjdejong,
the difference is due to that in 2.3 version you need to bind to access the directory data. You can see the root DN and the password in 'Users and Group -> LDAP Settings'.
In your commentary you said that you updated main.cf but as you see in the changeset there were more files. If you want to try this fix you should modify them all or you can wait to the next release of zentyal-mail.
Regards,
Javier
Finally, changing the port in /etc/init/ebox.slapd.conf and bouncing the Users and Groups module changed the port. But the postfix ldap bind error remains.