Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't connect with a linux user ...

Status
Not open for further replies.

yp56

Programmer
Aug 30, 2001
83
FR
hello,
I've installed postgresql on a knoppix (which is a debian) with this command : apt-get install postgesql
The installation had good worked. I restarted and i've 'postmaster' launch (ps -aux | grep postmaster) on the port 5432.
So i'm logged as root user and if i try :
root>psql -U postgres template1
I have a 'CONNECTION FAILED' : IDENT AUTHENTIFICATION FAILED FOR USER 'postgres'

So i try to connect to 'postgres' user and connect again :
root>su postgres
sh>psql template1
%>
I'm connected. So I create new user, new database, new administrator, but i always c'ant connect when I'm logged as root (or another user)...

Moreover, if I log as 'postgres' (su postgres) and launch pgaccess (which I installed with apt-get too), I always have a connection refused :(

My aim is to launch a Java application, wich run on windows with Interbase, on linux with postgresql, but I always have connection refused as I can connect with psql when I'm logged as 'postgres'. (Even if I'm logged as postgres I can't connect nor with pgacces nor with my application).

Can someone help us ?
thanks :)
 
see the documentation for pg_hba.conf and you will see why you can't connect with
root> psql -U postgres template1

if you want to do that, you have to change in pg_hba.conf the METHOD should be md5, and you have to set password for postgres (just read the file pg_hba.conf in the beginning there is a lot of explanations)

about the pgaccess: are you defenetly sure that postgres listens on tcp - see postgresql.conf and set
tcpip_socket = true
and again as a second problem the pg_hba.conf file can be the problem
 
ok, it runs :) thanks a lot.
bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top