Обсуждение: problems in connecting to a server
Hi
I have two Debian systems, both with
psql (PostgreSQL) 7.4.2
pgadmin3 1.0.2
but in one of them (the laptop) I am unable to make a connection with
pgadmin3, I always get:
----------
2004-05-11 10:13:12 ERROR : Error connecting to the server: FATAL: IDENT
authentication failed for user "pedro"
----------
The "pedro" user has been created previously with the "createuser" command
----------
pedro@pcporta16:~$ psql template1
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands
\g or terminate with semicolon to execute query \q to quit
template1=> \du List of database usersUser name | User ID | Attributes
-----------+---------+----------------------------fpam | 101 | create databasepedro | 100 | create
databasepostgres | 1 | superuser, create database
(3 rows)
-----------
Any help will be appreciated, thank you.
--
Pedro Henrique e Figueiredo Quaresma de Almeida
Em Terça, 11 de Maio de 2004 10:25, Pedro Quaresma de Almeida escreveu: > Hi > >I have two Debian systems, both with > > psql (PostgreSQL) 7.4.2 > pgadmin3 1.0.2 > > but in one of them (the laptop) I am unable to make a connection with > pgadmin3, I always get: > > ---------- > 2004-05-11 10:13:12 ERROR : Error connecting to the server: FATAL: IDENT > authentication failed for user "pedro" > ---------- > > The "pedro" user has been created previously with the "createuser" command > With the debug output option on I get: --------------- 2004-05-11 13:46:58 INFO : Creating pgConn object 2004-05-11 13:46:58 INFO : Server name: localhost (resolved to: 127.0.0.1) 2004-05-11 13:46:58 INFO : Opening connection with connection string: hostaddr=127.0.0.1 dbname=template1 user=pedro port=5432 2004-05-11 13:46:58 STATUS : Connecting to database without password... (0,01 segundos) 2004-05-11 13:46:58 ERROR : Error connecting to the server: FATAL: IDENT authentication failed for user "pedro" 2004-05-11 13:46:59 INFO : Destroying pgConn object ---------------- my "/var/lib/postgres/data/pg_hba.conf" file has in it the lines # All other connections by UNIX sockets local all all ident sameuser The user "pedro" is a valid Unix and PostgreSQL user. ??? Any help will be appreciated, thank you. -- Pedro Henrique e Figueiredo Quaresma de Almeida
Em Terça, 11 de Maio de 2004 19:49, escreveste: > hi! > > in my pg_hba.conf file i have this: > local all all trust > # IPv4-style local connections: > host all all 127.0.0.1 255.255.255.255 trust > # > > and everything works w/o problems. can you try it also? > this way, pgsql shouldn't ask for a password an authentication without a > password (what you're trying to do now as seen from the log) shouldn't be a > problem any more. > Thank you it worked. I had already tried the line "local ... trust", but it seems that I need the line "host ... trust". -- Pedro Henrique e Figueiredo Quaresma de Almeida