pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Kris Deugau <kdeugau@vianet.ca>
To: pgsql-admin@postgresql.org
Subject: Re: 7.4.3 and PAM authentication failures
Date: Tue, 17 Aug 2004 10:23:39 -0400
Message-ID: <412214EB.5B300875@vianet.ca> (raw)
References: <200408170206.i7H26nS27612@clas.ufl.edu>
Dallas N Antley wrote:
> /- On Monday (8/16/2004 19:35) Tom Lane <tgl@sss.pgh.pa.us> 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. <g>
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!
view thread (4+ messages)
Message-ID: <412214EB.5B300875@vianet.ca> Permalink: ../412214EB.5B300875@vianet.ca/ Also on: postgresql.org/message-id/412214EB.5B300875@vianet.ca ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-admin@postgresql.org Cc: kdeugau@vianet.ca Subject: Re: 7.4.3 and PAM authentication failures In-Reply-To: <412214EB.5B300875@vianet.ca> References: <200408170206.i7H26nS27612@clas.ufl.edu> <412214EB.5B300875@vianet.ca> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox