No Password Access

From: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: No Password Access
Date: 2011-02-08 22:36:30
Message-ID: AANLkTim32UNsiUogbcCW4ShOKAcSenHc=t-g2QgGbLB4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Today on a new PostgreSQL 9.0.3 server I created a new user:

CREATE ROLE carlos LOGIN CREATEDB CREATEROLE;
CREATE ROLE

I then set a password and comment on the user:

ALTER ROLE carlos WITH PASSWORD 'letmein';
ALTER ROLE

COMMENT ON ROLE carlos IS 'Database Administrator';
COMMENT

So I now try to connect to the database from my desk workstation:

carlos(at)laptop:~$ psql -h db1 -d postgres
psql (8.4.7, server 9.0.3)
WARNING: psql version 8.4, server version 9.0.
Some psql features might not work.
Type "help" for help.

postgres=> SELECT current_user;
current_user
--------------
carlos
(1 row)

postgres=> \du
List of roles
Role name | Attributes | Member of
-----------+-------------+-----------
carlos | Create role | {}
: Create DB
maggie | Create DB | {}
postgres | Superuser | {}
: Create role
: Create DB

Why am I not prompted for a password when I connect from my laptop to
the server? I didn't grant attributes of 'INHERIT' to carlos so
shouldn't I be prompted for my password? Am I missing something here?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2011-02-08 22:44:51 Re: Permission denied error - best way to fix?
Previous Message Thom Brown 2011-02-08 22:36:10 Re: Displaying text appears as hex data