su-like behavior

Поиск
Список
Период
Сортировка
От David Lutterkort
Тема su-like behavior
Дата
Msg-id 1139010516.27326.211.camel@currant.watzmann.net
обсуждение исходный текст
Ответы Re: su-like behavior  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-admin
Hi,

I want to run some sql scripts through psql from a process that runs as
root. Since I have no reason to trust the sql scripts, I want to run
them in psql as a specific database user that doesn't have a
corresponding login account, i.e. I want to do something like

        [start as root]
        su - postgres
        psql DBNAME DBUSER < script.sql

or
        [start as root]
        su - postgres
        psql
        \connect DBNAME DBUSER
        \i script.sql

The problem is that I haven't been able to do this without being
prompted for a password. Is this possible, i.e. is there a way to go
from a superuser (postgres) to a less privileged user without having to
supply the password ?

thanks,
David



В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: strange hung processes
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: su-like behavior