From owner-freebsd-questions@FreeBSD.ORG Mon Jul 3 09:51:00 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F28FB16A403 for ; Mon, 3 Jul 2006 09:51:00 +0000 (UTC) (envelope-from jonathan@hst.org.za) Received: from sirian.hst.org.za (sirian.hst.org.za [209.203.2.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18C5943E31 for ; Mon, 3 Jul 2006 09:50:59 +0000 (GMT) (envelope-from jonathan@hst.org.za) Received: from localhost (localhost.hst.org.za [127.0.0.1]) by sirian.hst.org.za (Postfix) with ESMTP id 4824331C85C for ; Mon, 3 Jul 2006 11:54:29 +0200 (SAST) Received: from sirian.hst.org.za ([127.0.0.1]) by localhost (sirian.hst.org.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68649-10 for ; Mon, 3 Jul 2006 11:54:29 +0200 (SAST) Received: by sirian.hst.org.za (Postfix, from userid 1004) id 1848731C7FE; Mon, 3 Jul 2006 11:54:29 +0200 (SAST) Received: from sysadmin.int.dbn.hst.org.za (sysadmin.int.dbn.hst.org.za [10.1.1.20]) by sirian.hst.org.za (Postfix) with ESMTP id 5D67531C7AE for ; Mon, 3 Jul 2006 11:54:28 +0200 (SAST) From: Jonathan McKeown Organization: Health Systems Trust To: freebsd-questions@freebsd.org Date: Mon, 3 Jul 2006 12:07:50 +0200 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607031207.50714.jonathan@hst.org.za> X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on sirian.hst.org.za X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=7.0 tests=BAYES_00 autolearn=ham version=2.61 X-Virus-Scanned: by amavisd-new at hst.org.za Subject: require pam_deny in auth chain causes logins to fail 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: Mon, 03 Jul 2006 09:51:01 -0000 pam.d/README says: Note that having a "sufficient" module as the last entry for a particular service and module type may result in surprising behaviour. To get the intended semantics, add a "required" entry listing the pam_deny module at the end of the chain. But in fact auth sufficient pam_unix.so auth required pam_deny.so always fails, because (from the PAM article): The second exception is that pam_setcred(3) treats binding and sufficient modules as if they were required which means the final decision drops through to pam_deny even if pam_unix succeeds. Other than the obvious (make pam_unix, or whatever is the last module in the auth chain, required rather than sufficient, and leave out the required pam_deny) is there another solution to this? Jonathan