Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 52602

Summary: cyrus-sasl with pam authentication fails
Product: Gentoo Linux Reporter: Tom Hosiawa <tomek32>
Component: Current packagesAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: High    
Version: 1.4_rc3   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tom Hosiawa 2004-05-31 11:10:14 UTC
I'm trying to setup sasl for authentication with pam. The problem is,
it's not working:

saslauthd[14463] :do_auth         : auth failure: [user=tom]
[service=smtp] [realm=] [mech=pam] [reason=PAM auth error]

I've tried it with shadow, but it still doesn't work. The only way sasl
does work, if I use auxprop to have sasl use its own database. The
reason I don't want to stay with this, is because I'm having problems
logging into my courier-imap account using pam. So I thinking the
problems is somewhere in pam.

I've looked all over for a solution, but I've found nothing. Should the default /etc/pam.d/smtp file allow logins? Do I have to modify it to work with pam?

I thought authentication with pam should work straight out of the box, am I wrong about this? I even thought there might be a problem with system libs, so I did a fresh install on another partition for testing; only to come up with the same result.

/etc/postfix/main.cf (the sasl part):
====================================
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_recipient_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination,
        reject_sender_login_mismatch
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes

/etc/pam.d/smtp:
===============
auth    required        /lib/security/pam_stack.so service=system-auth
account required        /lib/security/pam_stack.so service=system-auth

/etc/sasl2/smtpd.conf:
=====================
pwcheck_method: saslauthd
mech_list: LOGIN PLAIN

Reproducible: Always
Steps to Reproduce:
$ telnet eigen 25
Trying 192.168.1.2...
Connected to eigen.tomek.ca.
Escape character is '^]'.
220 mail.tomek.ca ESMTP Postfix
AUTH PLAIN ************************
535 Error: authentication failed



Portage 2.0.50-r7 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.4)
=================================================================
System uname: 2.6.4 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.90GHz
Gentoo Base System version 1.4.9
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.57-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -mmmx -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -mmmx -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j1"
PKGDIR="/mnt/gentoo/usr/portage/packages/pentium3"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://eigen.tomek.ca/gentoo-portage"
USE="3dnow S3TC X X509 aalib acl alsa apm arts avi berkdb bindist bonobo cdr
crypt cscope cups directfb divx4linux doc dvd encode esd fbcon foomaticdb gdbm
gif gimpprint gpm gtk gtk2 gtkhtml guile imap imlib java jpeg kde libg++ libwww
lzw-tiff mad maildir mbox mmx mozilla moznocompose moznoirc moznomail mozsvg
mozxmlterm mpeg ncurses nls nogcj noreiserfs oggvorbis opengl oss pam pcmcia
pdflib perl plotutils png pnp python qt quicktime readline samba sdl slang spell
sse ssl svga tcltk tcpd tetex threads tiff truetype type1 unicode usb
video_cards_nvidia vim-with-x wifi wildlsearch wmf wxwindows x86 xchattext
xerces xface xine xml2 xv xvid zlib"
Comment 1 Tuan Van (RETIRED) gentoo-dev 2004-07-18 12:17:15 UTC

*** This bug has been marked as a duplicate of 39497 ***