ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
* [Sysadmins] realms и cyrus-imapd + saslauthd
@ 2009-04-20 16:13 Timur Batyrshin
  2009-04-21  5:02 ` Sergey
  0 siblings, 1 reply; 3+ messages in thread
From: Timur Batyrshin @ 2009-04-20 16:13 UTC (permalink / raw)
  To: ALT Linux sysadmin discuss

[-- Attachment #1: Type: text/plain, Size: 3306 bytes --]

Настраиваю сервер IMAP (cyrus-imapd), который должен будет обслуживать
несколько доменов. База пользователей хранится в LDAP, стало быть,
sasl_pwcheck_method использую saslauthd.


Вопрос: умеет ли cyrus-imapd использовать realms при аутентификации при
помощи saslauthd ?
Если умеет, то что у меня не так? (подробный разбор полетов см. в конце письма)

Или может быть, можно как-то обойтись без использования saslauthd?
База пользователей тем не менее должна быть в LDAP.
Если да, то как это настраивается?



Обещанный разбор полетов:

[root@imap sasl2]# rpm -qa | egrep '(cyrus|sasl)'
cyrus-imapd-2.2.13-alt1.1
cyrus-sasl2-2.1.22-alt1.1.0
libsasl2-2.1.22-alt1.1.0


Saslauthd настроен нормально:

[root@imap ~]# testsaslauthd -u testuser -p secret -r domain.ru
0: OK "Success."


Cyrus-imapd настроен на использование saslauthd с использованием метода
PLAIN (т.к. DIGEST-MD5 и CRAM-MD5 работают только вместе с auxprop):

[root@imap ~]# grep sasl /etc/imapd.conf  | egrep -v '^#'
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN


При проверке сервера IMAPD при помощи imtest такое впечатление, что он
игнорирует realm, не передает его к saslauthd, в результате чего
аутентификация не проходит:

$ imtest -a testuser -w secret -r domain.ru web

В логах:
Apr 20 19:47:55 imap imap[20079]: accepted connection
Apr 20 19:47:55 imap saslauthd[23775]: Domain/Realm not available.
Apr 20 19:47:55 imap saslauthd[23775]: Entry not found ((&(mail=testuser@)(myorgUserEnabled=TRUE))).
Apr 20 19:47:55 imap saslauthd[23775]: Authentication failed for testuser: User not found (-6)
Apr 20 19:47:55 imap saslauthd[23775]: do_auth         : auth failure: [user=testuser] [service=imap] [realm=] [mech=ldap] [reason=Unknown]
Apr 20 19:47:55 imap imap[20079]: badlogin: [194.85.246.67] plaintext testuser SASL(-13): authentication failure: checkpass failed

Обратите внимание на строчку do_auth, а точнее на ее часть [realm=]
Если бы realm передавался к saslauthd, условие поиска было бы такое:
((&(mail=testuser@domain.ru)(myorgUserEnabled=TRUE)))
и аутентификация прошла бы успешно.

Точно такие же записи в логах вижу и при virtdomains в /etc/imapd.conf
выставленном в off, userid и on, так же как и в следующих вариантах
команды:

$ imtest -a testuser@domain.ru -w secret -r domain.ru web
$ imtest -a testuser -w secret web
$ imtest -a testuser@domain.ru -w secret -r domain.ru web

В чем проблема?

Если какие-то конфиги помогут -- скажите, вышлю.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-21  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-20 16:13 [Sysadmins] realms и cyrus-imapd + saslauthd Timur Batyrshin
2009-04-21  5:02 ` Sergey
2009-04-21  9:38   ` Timur Batyrshin

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git