Обсуждение: Authentication problems

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

Authentication problems

От
the inquirer
Дата:
I am a new postgres user who is having trouble
figuring out how user-based authentication is supposed
to work.  I create a database, create a user and
attempt to use psql to connect to the new database
using the new user.  However, the server always
responds with "psql: FATAL: IDENT authentication
failed for user "user".  Are there additionaly
security of configuration tasks that need to be done?

Here are the commands I am executing as the user
postgres:

$ createdb database
CREATE DATABASE
$ createuser -P user
Enter password for new user:
Enter it again:
Shall the new user be allowed to create databases?
(y/n) n
Shall the new user be allowed to create more new
users? (y/n) n
CREATE USER
$ psql -W -d database -U user
Password:
psql:  FATAL: IDENT authentication failed for user
"user"

I am running on Debian Sarge kernel versin 2.4.25-1.
All of my postgresql pkgs are 7.4.3-3.

Thanks,
listquestions.



_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

Re: [NOVICE] Authentication problems

От
Tom Lane
Дата:
the inquirer <listquestions@yahoo.com> writes:
> $ psql -W -d database -U user
> Password:
> psql:  FATAL: IDENT authentication failed for user "user"

It looks like you would rather use password authentication than the
default IDENT-based auth (it's default in Debian distro of postgres
anyway).  IDENT will only let you in when you do *not* use -U, ie,
your postgres user name is the same as your Unix user name.  Change
this in pg_hba.conf, and don't forget to SIGHUP or restart the
postmaster afterwards.

            regards, tom lane