Results 1 to 6 of 6
  1. #1
    Join Date
    May 2011
    Posts
    3

    Unanswered: 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.
    "

  2. #2
    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.

  3. #3
    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

  4. #4
    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)
    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)
    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?

  5. #5
    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

  6. #6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •