Thread: No Password Access

No Password Access

From
Carlos Mennens
Date:
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@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?

Re: No Password Access

From
Jens Wilke
Date:
On Dienstag, 8. Februar 2011, Carlos Mennens wrote:
> Why am I not prompted for a password when I connect from my laptop
> to the server?

check your pg_hba.conf