Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

postgresql unable to login

$
0
0

I created a user named ‘client’, witch refuses to connect.
Here’s my client:

CREATE ROLE client LOGIN
  ENCRYPTED PASSWORD 'md5d5bc32b75da65fe60067f501a4bb6665'
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL '1970-01-01 00:00:00';
GRANT viewers TO client;

Here’s how I changed his password:

ALTER USER client PASSWORD 'client';

Here’s how I fail to connect:

psql -h localhost -d core -U client
Password for user client: 
psql: FATAL:  password authentication failed for user "client"
FATAL:  password authentication failed for user "client"

What have I done wrong? (I did tried restarting)

Just in case there are some more dumps:

viewers group:

CREATE ROLE viewers LOGIN
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL '1970-01-01 00:00:00';

core database

CREATE DATABASE core
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'en_US.UTF-8'
       LC_CTYPE = 'en_US.UTF-8'
       CONNECTION LIMIT = -1;
GRANT CONNECT, TEMPORARY ON DATABASE core TO public;
GRANT ALL ON DATABASE core TO postgres;
GRANT CONNECT, TEMPORARY ON DATABASE core TO viewers;

Viewing all articles
Browse latest Browse all 1138

Trending Articles