If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > CentOS vs pgadmin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-20-11, 04:50
fgoncalo fgoncalo is offline
Registered User
 
Join Date: May 2011
Posts: 3
CentOS vs pgadmin

Hi,

So i am trying to work with pg admin 3 on a CentOS virtual machine (i "built it vmware workstation"). I am quite new to centOS, and so far so good i believe, i am working hard to learn how to deal with it. Hopefully i will get rid off Windows soon
I've installed pg admin3 with no problems, and everything was going ok, at least i was hopping for that, until i got into a dead end, when i tried to add a new server, i left, as default, the "Maintenance DB : postgres" and the "username: myusername" and running "localhost". I tried to start the proccess, but i got this error (check above)
I already googled it, but still, it hasn't been easy to reach a solution.
For sure this seems like a silly question, but as i said, i'm quite new to this, and i really want to learn it


Thanks in advance,
Filipe

"
Ident authentication failed
The server doesn't accept the current user: The server reports
FATAL: Ident authentication failed for user "myusername"
If this message appears, the pg_hba.conf entry found for your client / user / database combination is set to "ident" authentication. Some distributions, e.g. Debian, have this by default. To perform ident based authentication successfully, you need additional setup; see the PostgreSQL help for this. For a beginner, it might be more appropriate to use a different authentication method; MD5 encrypted passwords are a good choice, which can be configured by an entry in pg_hba.conf like this:
host all all 192.168.0.0/24 md5
This example grants MD5 encrypted password access to all databases to all users on the private network 192.168.0.0/24.
You can use the pg_hba.conf editor that is built into pgAdmin III to edit the pg_hba.conf configuration file. After changing pg_hba.conf, you need to trigger a server configuration reload using pg_ctl or by stopping and restarting the server process.
"
Reply With Quote
  #2 (permalink)  
Old 05-20-11, 06:26
rski rski is offline
Registered User
 
Join Date: Nov 2006
Posts: 82
Find pg_hba.conf file in that file you will see lines SIMILAR to that
Code:
host all all 192.168.0.0/24 ident
and
Code:
local all all ident
Just replace ident with trust and restart server. It should help.
You can also replace ident with md5 or password but you will have to set a password for database user first.
Reply With Quote
  #3 (permalink)  
Old 05-20-11, 07:00
fgoncalo fgoncalo is offline
Registered User
 
Join Date: May 2011
Posts: 3
Hi, thanks for your attention.

I have already tried, i had a pg_hba.conf.sample, so i made a copy of it.
i changed the way you told me a couple of times before, it still does not working. Kind of getting desperate here...

now it looks like:

#IPV4 local conections:
host all all 127.0.0.1/32 trust

#IPV6 local conections:
host all all ::1/128 trust

this is really killing my head :s
Reply With Quote
  #4 (permalink)  
Old 05-20-11, 07:58
rski rski is offline
Registered User
 
Join Date: Nov 2006
Posts: 82
Error message suggests you missed something.
1) Did you restart or reload server after changeing pg_hba.conf file?
2)
Quote:
I have already tried, i had a pg_hba.conf.sample, so i made a copy of it.
But you renamed it to pg_hba.conf right? Where did you put that file I mean did you replace teh original file pg_hba.conf that exists before.
3)
Quote:
now it looks like:

#IPV4 local conections:
host all all 127.0.0.1/32 trust

#IPV6 local conections:
host all all ::1/128 trust
is that all uncommented lines you got in pg_hba.conf?

4) Do you have on your OS other pg_hba.conf files?
Reply With Quote
  #5 (permalink)  
Old 05-20-11, 08:27
fgoncalo fgoncalo is offline
Registered User
 
Join Date: May 2011
Posts: 3
1) Did you restart or reload server after changeing pg_hba.conf file?
yes, i have done it like 100 times (sudo /sbin/service postgresql)

2)But you renamed it to pg_hba.conf right? Where did you put that file I mean did you replace teh original file pg_hba.conf that exists before.
i created a new file like this
sudo cp -r [directory]/pg_hba.conf.sample[(same)directory]pg_hba.conf

3)is that all uncommented lines you got in pg_hba.conf?
yes, i don't have any others...

4) Do you have on your OS other pg_hba.conf files?
using the locate pg_hba.conf it only shows me the one I've created
Reply With Quote
  #6 (permalink)  
Old 05-20-11, 08:37
rski rski is offline
Registered User
 
Join Date: Nov 2006
Posts: 82
What is the full directory name where you placed pg_hba.con file?

To look for another pg_hba.conf files run this command (as root)
Code:
find / -iname pg_hba.conf 2>/dev/null
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On