Re: PAM authentication fails for local UNIX users

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Dhanaraj(dot)M(at)Sun(dot)COM, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PAM authentication fails for local UNIX users
Date: 2007-08-20 15:40:51
Message-ID: 46C9B603.7010807@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
>
>
> Zdenek Kotala wrote:
>>
>> The problem what Dhanaraj tries to address is how to secure solve
>> problem with PAM and local user. Other servers (e.g. sshd) allow to
>> run master under root (with limited privileges) and forked process
>> under normal user. But postgresql
>> requires start as non-root user. It limits to used common pattern.
>>
>> There is important question:
>>
>> Is current requirement to run postgresql under non-root OK? If yes,
>> than we must update PAM documentation to explain this situation which
>> will never works secure. Or if we say No, it is stupid limitation (in
>> case when UID 0 says nothing about user's privileges) then we must
>> start discussion about solution.
>>
>>
>
> For now I think we should update the docs.

I agree.

> I suspect
> the changes involved in allowing us to run as root and then give up
> privileges safely would be huge, and the gain quite small.

The main problem there is that there are a lot of different ways how to
do it and there is not standard. For example on Solaris applications use
RBAC functionality to handle privileges and this is not available on
other platforms and so on...

> I'd rather see an HBA fallback mechanism, which I suspect might overcome
> most of the problems being encountered here.

The question is why don't use fallback functionality guaranteed by PAM
and naming services. It seems that only fallback to or from password
auth makes sense. Other could be handled by PAM/naming.

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2007-08-20 17:55:33 Re: random crashes on -HEAD for a few days now
Previous Message Tom Lane 2007-08-20 14:45:00 Re: random crashes on -HEAD for a few days now

Browse pgsql-patches by date

  From Date Subject
Next Message Teodor Sigaev 2007-08-20 16:03:28 Re: tsearch core path, v0.58
Previous Message Tom Lane 2007-08-20 14:46:24 Re: HOT patch - version 14