Обсуждение: Problems with authentication

Поиск
Список
Период
Сортировка

Problems with authentication

От
Frans Haarman
Дата:
Hi,

I am building a webapplication for school, as a project.

Basicly I want users to connect with their postgresql password an
username.

I tried:
local all password

but then it asks for a password when booting the server, and I would
like to have this done automaticly.

Basicly I want everybody to require a password, and have the server
startup automaticly.

Thanks for any help.

Warm regards,

Frans

Re: Problems with authentication

От
Bruno Wolff III
Дата:
On Tue, Jan 21, 2003 at 20:14:56 +0100,
  Frans Haarman <frans@haarman.com> wrote:
> Hi,
>
> I am building a webapplication for school, as a project.
>
> Basicly I want users to connect with their postgresql password an
> username.
>
> I tried:
> local all password
>
> but then it asks for a password when booting the server, and I would
> like to have this done automaticly.
>
> Basicly I want everybody to require a password, and have the server
> startup automaticly.

In 7.3 there is a user column in the hba file that you can use to except
the web account from a password check.

Since you are using local, you might also consider using ident authentication.
If people aren't sharing accounts, this probably gives you what you want.

Re: Problems with authentication

От
Tom Lane
Дата:
Frans Haarman <frans@haarman.com> writes:
> I tried:
> local all password
> but then it asks for a password when booting the server, and I would
> like to have this done automaticly.

You could tell the pg_ctl script not to try to check whether the
postmaster started; then it won't need to connect and so won't need
a password.  I forget the switch for this, but it's in the docs.

But in general, password auth is a pain in the neck for all admin
duties.  I agree with Bruno Wolff's suggestion to look at alternative
auth methods.  "ident" on local connections is secure, if your operating
system supports it.

            regards, tom lane