X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5851A5E46EF for ; Tue, 17 Aug 2004 11:23:49 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94894-07 for ; Tue, 17 Aug 2004 14:23:42 +0000 (GMT) Received: from smtp.vianet.ca (smtp.vianet.ca [209.91.128.40]) by svr1.postgresql.org (Postfix) with SMTP id 17C835E3633 for ; Tue, 17 Aug 2004 11:23:38 -0300 (ADT) Received: (qmail 7009 invoked from network); 17 Aug 2004 14:23:45 -0000 Received: from unknown (HELO vianet.ca) (209.91.179.130) by smtp.vianet.ca with SMTP; 17 Aug 2004 14:23:45 -0000 Message-ID: <412214EB.5B300875@vianet.ca> Date: Tue, 17 Aug 2004 10:23:39 -0400 From: Kris Deugau Reply-To: pgsql-admin@postgresql.org, pgsql-admin@postgresql.org Organization: ViaNet Pembroke X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: 7.4.3 and PAM authentication failures References: <200408170206.i7H26nS27612@clas.ufl.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/140 X-Sequence-Number: 14535 Dallas N Antley wrote: > /- On Monday (8/16/2004 19:35) Tom Lane wrote: > > I think you've proven that the particular PAM modules you are > > testing with are useless for programs executing as non-root, but > > that doesn't mean the entire concept is broken. Look around ... > > there are lots of > > PAM modules (or at least that's the theory). > > Correct. I'm only referring to pam_unix* modules. This has come up > on the list a few times, but there's never been a "solution" in any > of the replies. I'm not sure what you're looking for in a solution, but I dug through the source to one of the pam_unix modules at one point to see why an app I was writing was misbehaving. In short, pam_unix specifically reads /etc/passwd and /etc/shadow (unless your NSS configuration uses NIS, LDAP, or some other remote-authentication system- and even then it may still need root access) and if you don't want PAM or your app to be setuid root, you don't use pam_unix (or any of the other modules that require root access for one reason or another). If you want PAM authentication against the system password file, your app MUST either: 1) Run setuid root OR 2) Communicate with some external authentication system that runs setuid root. This can be done relatively easily through PAM; you just have to find the appropriate modules and authentication daemon. So far as I understand your original question, you're asking "I want to authenticate against the system password file, but I don't want my app [Postgres] to have root priviledges in any way". PAM, in and of itself, does not inherently require root access to work correctly - UNLESS you're using a particular PAM module that *does*.... such as pam_unix. This is by no means unique to Postgres. -kgd -- Get your mouse off of there! You don't know where that email has been!