From: Timur Batyrshin <batyrshin@ieml.ru> To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org> Subject: [Sysadmins] realms и cyrus-imapd + saslauthd Date: Mon, 20 Apr 2009 20:13:57 +0400 Message-ID: <20090420201357.250a57d2@batyrshin.kzn.ieml.ru> (raw) [-- 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 --]
next reply other threads:[~2009-04-20 16:13 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-04-20 16:13 Timur Batyrshin [this message] 2009-04-21 5:02 ` Sergey 2009-04-21 9:38 ` Timur Batyrshin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090420201357.250a57d2@batyrshin.kzn.ieml.ru \ --to=batyrshin@ieml.ru \ --cc=sysadmins@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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