The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to login to phpPgAdmin

Discussion in 'Database Discussions' started by Oldiesmann, Jan 2, 2009.

  1. Oldiesmann

    Oldiesmann Active Member

    Joined:
    Dec 30, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cincinnati, Ohio, USA
    When I try to login to phpPgAdmin (both the one included with cPanel and a standalone copy) with my cPanel username and password, I simply get "Login failed". Since creating database users in cPanel doesn't actually do anything (try using one - it doesn't work), I'm not sure what I need to do. PostgreSQL itself works fine. I just need to add a new function on a database and it would be nice to not have to resort to using PutTy or creating a script to do this.

    I do have root access on this server if needed (it's a VPS).
     
  2. Oldiesmann

    Oldiesmann Active Member

    Joined:
    Dec 30, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cincinnati, Ohio, USA
    This has been resolved.

    For anyone else running into this problem:

    Edit /var/lib/pgsql/data/pg_hba.conf

    Look for this line:
    Code:
    # "local" is for Unix domain socket connections only
    local   all         all                               ident sameuser
    Change it to this:
    Code:
    # "local" is for Unix domain socket connections only
    local   all         all                               trust
     
  3. chaloupe

    chaloupe Well-Known Member

    Joined:
    Mar 17, 2006
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Dieppe, NB, Canada
    Thanks for the quick fix. Also did work for us on standard servers(not VPS)

    Regards,
     
  4. stugster

    stugster Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, UK
    cPanel Access Level:
    Root Administrator
    Just to add that this fix worked for us :)
     
  5. teh

    teh Member

    Joined:
    Jul 13, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Isn't that supposed to be done by something like /scripts/installpostgres then?

    Boy .. you need a lot of reading on the forums to assemble a working, stable (as in cpanel version/branch, yes) and "cpanel-supported" components system as such information cannot be found anywhere else.
     
  6. capoinfra

    capoinfra Well-Known Member

    Joined:
    Oct 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Uruguay
    Works perfect, thank you!
     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    A configuration using "trust" is not recommended for shared hosting environments as it will trust all PgSQL database users that attempt to access a database without requiring authentication.

    The recommended authentication will be setup when following our documentation as a guide, or as detailed below in the following 2-step process:

    The following two steps assume you have already run the following script:
    /scripts/installpostgres

    Step 1.) This step will setup a working "pg_hba.conf" configuration file for PostgreSQL using MD5 authentication; this will initialize the configuration so that cPanel users can successfully login to phpPgAdmin.
    WHM: Main >> SQL Services >> Postgres Config >> Postgres Config Install

    Here is an example of what the "pg_hba.conf" file should contain after setup via WHM:
    Code:
    local all all        md5   
    host all all  127.0.0.1   255.255.255.255   md5
    Step 2.) This step will ensure that your PostgreSQL (PgSQL db and PgSQL user management) features in cPanel are able to function:
    WHM: Main >> SQL Services >> Postgres Config >> Postgres Password
    On the above page, the PostgreSQL password needed to be set.

    Related documentation:
    Installing PostgreSQL on your cPanel/WHM Server
     
  8. Valentin

    Valentin Member

    Joined:
    Dec 10, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I've installed postgres as described in the linked guide, but the only chance to get phppgadmin working is the configuration above with "trust".

    After setting to "md5" the login page of phppgadmin refreshes and says "Login failed".

    Connections with php and stuff works works without problems.

    Any suggestions?
     
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    There is a problem if phpPgAdmin and PostgreSQL does not work with "md5" set as the authentication method; using "trust" is essentially no authentication and is a hazardous security risk.

    Please submit a support request so that we may accurately diagnose and assist with investigation of the issue and surrounding circumstances; when available, please let me know the ticket ID number of your support request so that I may follow-up internally. Optionally, if you would like me to take a look at the issue you may include "Attn Don" somewhere in the ticket subject.

    Once the issue is identified we can help determine a path towards resolution and, subsequently, any pertinent information regarding a solution may be shared in this thread to help others that may be in a similar situation. :)
     
Loading...

Share This Page