From owner-freebsd-questions@FreeBSD.ORG Fri Apr 25 19:44:43 2008 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AB5B106566B for ; Fri, 25 Apr 2008 19:44:43 +0000 (UTC) (envelope-from Lena@lena.kiev.ua) Received: from mx3.cyfra.com (mx3.cyfra.ua [62.80.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8CAB48FC1A for ; Fri, 25 Apr 2008 19:44:41 +0000 (UTC) (envelope-from Lena@lena.kiev.ua) Received: from c.195.174.a516.dyn.adsl.cyfra.net ([62.80.174.195] helo=bedside.lena.kiev.ua) by mx3.cyfra.com with esmtp (Exim 4.68) (envelope-from ) id 1JpQdF-0002PT-0y for freebsd-questions@FreeBSD.org; Fri, 25 Apr 2008 19:18:41 +0300 Received: from bedside.lena.kiev.ua (localhost.lena.kiev.ua [127.0.0.1]) by bedside.lena.kiev.ua (8.14.2/8.14.2) with ESMTP id m3PGIb3o026112 for ; Fri, 25 Apr 2008 19:18:38 +0300 (EEST) (envelope-from Lena@lena.kiev.ua) Received: (from lena@localhost) by bedside.lena.kiev.ua (8.14.2/8.14.2/Submit) id m3PGIbgt026111 for freebsd-questions@FreeBSD.org; Fri, 25 Apr 2008 19:18:37 +0300 (EEST) (envelope-from Lena@lena.kiev.ua) Date: Fri, 25 Apr 2008 19:18:37 +0300 From: Lena@lena.kiev.ua To: freebsd-questions@FreeBSD.org Message-ID: <20080425161837.GD735@lena.kiev> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: PAM error: error in service module X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2008 19:44:43 -0000 Hi, I'm trying to set up Exim in a jail to authenticate using the security/pam_pop3 port. Exim authenticator: plain: driver = plaintext public_name = PLAIN server_prompts = : server_condition = ${if pam{$auth2:${sg{$auth3}{:}{::}}}} server_set_id = $2 The jail hasn't /etc/pam.conf file, /etc/pam.d/exim contains one line: auth required /usr/local/lib/pam_pop3.so hostname=localhost debug pwprompt=Password: timeout=5 Exim correctly passes the login (email address) and password to pam_pop3 (they are visible in /var/log/debug.log), pam_pop3 asks the POP3 server and gets the +OK response (password correct): Apr 25 17:22:41 lena PAM-pop3[24639]: Received Password Response: +OK^M Apr 25 17:22:41 lena PAM-pop3[24639]: Sent QUITting: QUIT ^M Apr 25 17:22:41 lena PAM-pop3[24639]: Authentication Succeeded for (username)@(domain) at server localhost port 110 But then Exim gets the error (output of `exim -d+auth -bh 62.80.174.195`, I masked the login and password): $auth1 = $auth2 = (username)@(domain) $auth3 = (password) $1 = $2 = (username)@(domain) $3 = (password) Running PAM authentication for user "(username)@(domain)" PAM error: error in service module expansion failed: error in service module SMTP>> 435 Unable to authenticate at present Nothing in /var/log/messages,auth.log. uname -a FreeBSD lena.kiev.ua 6.3-STABLE FreeBSD 6.3-STABLE #0: Mon Mar 24 08:01:01 CET 2008 root()dione.ispsystem.net:/root/src/sys/i386/compile/ISPSYSTEM_PAE i386 On another machine - my 6.2-RELEASE-p1 workstation: /usr/src # fgrep -r -B 1 'error in service module' * contrib/openpam/lib/pam_strerror.c- case PAM_SERVICE_ERR: contrib/openpam/lib/pam_strerror.c: return ("error in service module"); /usr/src # fgrep -r 'PAM_SERVICE_ERR' * | wc -l 85 I have root access only inside the jail (it's VPS/VDS). How can I debug futher? Thanks, Lena