psql: FATAL: role "xyz" is not permitted to log in

From: Ralph Smith <smithrn(at)washington(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: psql: FATAL: role "xyz" is not permitted to log in
Date: 2008-04-04 21:06:43
Message-ID: 2BDD129E-D0E4-4DEE-BDA3-18411ECA8EC8@washington.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I just can't connect to a database, though I can to others as other
users...

postgres=# CREATE ROLE xyz WITH password 'abc' ;
CREATE ROLE

postgres=# CREATE DATABASE LabNews_dev WITH OWNER=xyz ENCODING='UTF8' ;
CREATE DATABASE

postgres=# grant create, connect on database LabNews_dev to xyz with
grant option;
GRANT
--------------------------------
In pg_hba.conf:
local LabNews_dev
labnews trust
host LabNews_dev labnews ###.###.###.###/32 trust #
crushinator (Taylor)
-------------------------------
In postgresql.conf:
listen_addresses = '*'
#ssl = true # (change requires restart)
#password_encryption = on
------------------------------
I've reloaded (& restarted) the DB

=======================================
WHAT DOESN'T WORK:

postgres(at)flexo:~/8.2/main$ psql -U xyz LabNews_dev
psql: FATAL: database "LabNews_dev" does not exist

okay...
postgres(at)flexo:~/8.2/main$ psql -U xyz labnews_dev
psql: FATAL: no pg_hba.conf entry for host "[local]", user "labnews",
database "labnews_dev", SSL off

AND REMOTELY:
smithrn(at)smithrn-ltb1:~$ psql -h thathost -U xyz labnews_dev
Password for user labnews:
psql: FATAL: password authentication failed for user "labnews"

And I have ALTER ROLE'd to assure I set the password right.

=========================================
HOWEVER:

postgres(at)flexo:~/8.2/main$ psql -U otherdbuser otherdb
Welcome to psql 8.2.6, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

airburst=#

and
smithrn(at)smithrn-ltb1:~$ psql -h flexo -U otherdbuser otherdb
Welcome to psql 8.2.7 (server 8.2.6), the PostgreSQL interactive
terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

airburst=# \q

What am I missing???

Thanks!

Ralph
=====================

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-04-04 21:11:49 Re: psql: FATAL: role "xyz" is not permitted to log in
Previous Message Gregory Stark 2008-04-04 21:00:17 Re: modules