No Password Access

Started by Carlos Mennensabout 15 years ago2 messagesgeneral
Jump to latest
#1Carlos Mennens
carlos.mennens@gmail.com

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?

#2Jens Wilke
jens@wilke.org
In reply to: Carlos Mennens (#1)
Re: No Password Access

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