auth_bind with "()" in username not working

Matthias Lay matthias.lay at securepoint.de
Thu Jun 9 12:48:56 UTC 2016


Hi all,


I have an AD testsetup with auth_bind setting


auth_bind_userdn = "spdev\\%Ln" 


I created a testuser "claasc (test)" which works fine in all ldapfilters
but not for the auth_bind.

the log shows everything correct just "invalid credentials"


mail.debug: Jun  9 14:12:31 dovecot: auth: Debug: auth client connected
(pid=12202) mail.debug: Jun  9 14:12:31 dovecot: auth: Debug: client
in: AUTH	1	PLAIN	service=imap
secured	session=T6knVtc0wQB/AAAB	lip=127.0.0.1
rip=127.0.0.1	lport=143	rport=39873 mail.debug: Jun  9
14:12:31 dovecot: auth: Debug: client passdb out: CONT	1
mail.debug: Jun  9 14:12:31 dovecot: auth: Debug: client in:
CONT<hidden> mail.debug: Jun  9 14:12:31 dovecot: auth: Debug:
passwd-file(claasc (test),127.0.0.1,<T6knVtc0wQB/AAAB>): cache miss
mail.debug: Jun  9 14:12:31 dovecot: auth: Debug: passwd-file(claasc
(test),127.0.0.1,<T6knVtc0wQB/AAAB>): lookup: user=claasc (test)
file=/etc/dovecot/passwd.postmaster mail.info: Jun  9 14:12:31 dovecot:
auth: passwd-file(claasc (test),127.0.0.1,<T6knVtc0wQB/AAAB>): unknown
user (given password: HubertHans99) mail.debug: Jun  9 14:12:31
dovecot: auth: Debug: ldap(claasc (test),127.0.0.1,<T6knVtc0wQB/AAAB>):
cache miss mail.info: Jun  9 14:12:31 dovecot: auth: ldap(claasc
(test),127.0.0.1,<T6knVtc0wQB/AAAB>): invalid credentials mail.debug:
Jun  9 14:12:33 dovecot: auth: Debug: client passdb out: FAIL
1	user=claasc (test) mail.info: Jun  9 14:12:33 dovecot:
imap-login: Aborted login (auth failed, 1 attempts in 2 secs):
user=<claasc (test)>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1,
secured, session=<T6knVtc0wQB/AAAB>


So I guess its just a bind problem. 

strace output from auth process of imap login:

write(26, "0-\2\1\4`(\2\1\3\4\25spdev\\claasc
\\(test\\)\200\fHubertHans99", 47) = 47


the additional \\ in front of the brackets look strange to me and might
be the reason.

tested Version is 2.2.18


Greetz Matze


More information about the dovecot mailing list