Обсуждение: Problem setting up new users

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

Problem setting up new users

От
"Michael J. Robinson"
Дата:

Im having problems setting up postgres with new users.  It is a new install using 7.3..8 rpms.  Use the following to create a new user.

create USER foo WITH PASSWORD 'secret';

When I try to login I get the following error:

[root@host postgressql]# psql template1 -U foo --password

Password:

psql: FATAL:  IDENT authentication failed for user "foo"

If anyone can help me with this, I would be greatful.

Thank you,

Michael J. Robinson

Northeast Ohio Digital Inc.

http://www.neod.net

robinson@neod.net

330.830.6551

888.232.6363

CONFIDENTIALITY NOTICE: The materials attached hereto are confidential and the property of the sender. The information contained in the attached materials is privileged and/or confidential and is intended only for the use of the above-named individual(s) or entity(ies). If you are not the intended recipient, be advised that any unauthorized disclosure, copying, distribution or the taking of any action in reliance on the contents of the attached information is strictly prohibited. If you have received this transmission in error, please discard the information immediately.

Re: Problem setting up new users

От
Tom Lane
Дата:
"Michael J. Robinson" <robinson@neod.net> writes:
> When I try to login I get the following error:

> [root@host postgressql]# psql template1 -U foo --password
> Password:
> psql: FATAL:  IDENT authentication failed for user "foo"

The prompt tells the tale: you aren't "foo", you are "root".
IDENT wants those things to be the same.  The password you
forced psql to ask you for is totally irrelevant.

Probably your best bet is to "su" from root to postgres and then create
your initial users as postgres.  You can create root as a postgres
superuser if you would prefer to do this sort of maintenance from the
root account in future.  (Whether that's a good idea is another question
--- in general, using root for more than you absolutely must isn't good
practice IMHO.)

You could also think about changing to some other auth method besides
IDENT, if you would prefer to operate with Postgres passwords instead of
who-are-you-to-the-kernel.

            regards, tom lane