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

Поиск
Список
Период
Сортировка
От Stephane Bortzmeyer
Тема Re: How to know the password for the user 'postgres'
Дата
Msg-id 20081031133131.GB10081@laperouse.bortzmeyer.org
обсуждение исходный текст
Ответ на Re: How to know the password for the user 'postgres'  ("Tim Bruce - Postgres" <postgres@tbruce.com>)
Список 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 по дате отправления:

Предыдущее
От: Joseph S
Дата:
Сообщение: Re: harddisk configuration
Следующее
От: Eric Schwarzenbach
Дата:
Сообщение: Wildly erratic query performance