Re: How to know the password for the user 'postgres' - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: How to know the password for the user 'postgres'
Date
Msg-id 20081031133131.GB10081@laperouse.bortzmeyer.org
Whole thread Raw
In response to Re: How to know the password for the user 'postgres'  ("Tim Bruce - Postgres" <postgres@tbruce.com>)
List pgsql-general
On Tue, Oct 28, 2008 at 07:13:38AM -0700,
 Tim Bruce - Postgres <postgres@tbruce.com> wrote
 a message of 41 lines which said:

> Wouldn't it be better to add the line 'sudo su - postgres' as the
> entry (command) for the user(s) in the sudoers file?

Simpler, set the "runas" parameter:

jsmith    ALL=(postgres) ALL

That way, user "jsmith" can run anything as the "postgres" user, such as:

% sudo -u postgres createdb foobar

(I simply do not understand why to use the old su together with
sudo. su is almost useless today: it does not allow fine-grain
control, it doesn't log, etc.)

pgsql-general by date:

Previous
From: Joseph S
Date:
Subject: Re: harddisk configuration
Next
From: Eric Schwarzenbach
Date:
Subject: Wildly erratic query performance