P
P
P_Alexander2019-09-17 23:34:19
PostgreSQL
P_Alexander, 2019-09-17 23:34:19

How to fix - psql: IMPORTANT: User 'lightSql' is not authenticated (Ident)?

Installed Postgres server 11, connected as user postgres, created user, created database, logged out.
I connected again as postgres and decided to log in as a new user, entered the command -
psql -h localhost db_inter_pas lightSql
Output -

psql: ВАЖНО:  пользователь "lightSql" не прошёл проверку подлинности (Ident)

Tried like this - psql -U lightSql -h localhost -d db_inter_pas
Conclusion -
psql: ВАЖНО:  пользователь "lightSql" не прошёл проверку подлинности (Ident)

At the same time, I uncommented the line in the config - listen_addresses = 'localhost'
Why? How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
P_Alexander, 2019-09-18
@P_Alexander

Issue solved!
1 I changed in the file - /var/lib/pgsql/11/data/pg_hba.conf such lines
host all all 127.0.0.1/24 ident -> md5
host all all 192.168.18.0/24 ident -> md5
This solved my issue , but then I was tinkering with the entrance!
I realized that it is NEVER possible to create a user and that if there were capital letters in the name, the database will see them as small letters, and I got nervous when I tried to log in from the user but could not enter the correct password, although I created this user a minute ago and the password was written in front of me From him!!!!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question