Re: How to know the password for the user 'postgres'

From: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
To: Tim Bruce - Postgres <postgres(at)tbruce(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to know the password for the user 'postgres'
Date: 2008-10-31 13:31:32
Message-ID: 20081031133131.GB10081@laperouse.bortzmeyer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 28, 2008 at 07:13:38AM -0700,
Tim Bruce - Postgres <postgres(at)tbruce(dot)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.)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2008-10-31 13:39:46 Re: Equivalent for AUTOINCREMENT?
Previous Message Kevin Murphy 2008-10-31 13:20:48 perl-DBD-Pg package for CentOS 5?