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.

Set PostgreSQL Password

Discussion in 'General Discussion' started by Marty, Aug 11, 2003.

Thread Status:
Not open for further replies.
  1. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    I am on 7.4.0 R29 on one test server and have run the /scripts/installpostgresql script, however the "Set PostgreSQL Password" function in WHM still returns:

    "Setting up Postgres Config...Done
    Reloading Postgres...postmaster successfully signaled
    Done
    Changing Password....psql: FATAL 1: IDENT authentication failed for user "postgres"
    Done
    Reloading Postgres...postmaster successfully signaled
    Done
    The Postgres Password has been changed"

    Anybody else still having this problem, or is there a simple fix?

    cPanel.net Support Ticket Number:
     
  2. hormigo

    hormigo Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    i have the same problem

    cPanel.net Support Ticket Number:
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Interesting. I am getting the following error:

    And yet I do have a pg_hba.conf file, and it seems to be correct, because I can change the password from the command line, and I can add databases from the command line, too.

    I already upgraded to the latest edge, which was supposed to fix the bug, but my problems are persisting. You guys should try upgrading to see what happens.

    cPanel.net Support Ticket Number:
     
  4. hormigo

    hormigo Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    now i am getting this error

    Setting up Postgres Config...Done
    Reloading Postgres...postmaster successfully signaled
    Done
    Changing Password....psql: FATAL 1: Missing or erroneous pg_hba.conf file, see postmaster log for details

    Done
    Reloading Postgres...postmaster successfully signaled
    Done

    The Postgres Password has been changed

    I am running last edge

    cPanel.net Support Ticket Number:
     
    #4 hormigo, Aug 11, 2003
    Last edited: Aug 11, 2003
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    At least I'm not alone.:p

    cPanel.net Support Ticket Number:
     
  6. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Here's something interesting. If I type in the current password in the WHM set postgres password, I get:

    However, if I type a different password, I get:

    :confused:

    cPanel.net Support Ticket Number:
     
  7. illusionfxnet

    illusionfxnet Registered

    Joined:
    Aug 9, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    hrm, odd. Everything seems to of worked here without a single problem. Running Redhat 7.3 on 7.4.0 Edge 41... only thing though is that we did have a version of PostgreSQL already on the box when we ran ./installpostgresql It wasn't an rpm, but a manually compiled version that was already on the box....

    Setting up Postgres Config...Done
    Reloading Postgres...pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid
    Is postmaster running?
    Done
    Changing Password....ALTER USER
    Done
    Reloading Postgres...pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid
    Is postmaster running?
    Done

    The Postgres Password has been changed

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  8. Guile

    Guile Well-Known Member

    Joined:
    Apr 25, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    I don't see ./installpostgresql, I only see ./installpostgres.

    I am running: WHM 7.4.0 cPanel 7.4.0-S12 RedHat 7.3 - WHM X v2.1 and I get this error after trying to set password:

    Setting up Postgres Config...Done
    Reloading Postgres...pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid
    Is postmaster running?
    Done
    Changing Password....psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
    Done
    Reloading Postgres...pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid
    Is postmaster running?
    Done

    The Postgres Password has been changed


    My guess is that installing Postgres via "install rpm" was a bad thig and that Postgres is not runing. Anyone else?

    BTW, when I try to run ./installpostgres in /scripts/ I get the following:

    root@pool [/scripts]# ./installpostgres
    installed: postgresql-server-7.2.3-5.73
    installed: postgresql-7.2.3-5.73
    Initializing database: [FAILED]
    Starting postgresql service: [FAILED]
    root@pool [/scripts]#


    Help!

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  9. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    I can only get you to where I am.
    # rpm -qa | grep postgre
    # rpm -e anything_that_appeared_after_the_previous_command
    # rm -rf /var/lib/pgsql/data
    # /scripts/installpostgres

    cPanel.net Support Ticket Number:
     
  10. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    Hello, how can it be working if you got errors? You have error all the way though this password change. I doubt yours is working.

    cPanel.net Support Ticket Number:
     
  11. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    This progresql problem is a load of crap. Cpanel has no idea what they are doing here. Whatever they are doing is not even correct.

    First of all the password change for postgres, from WHM, doesnt work. Those running E41 can attest to that! It still doesnt work after how many weeks? If it doesnt work then try setting the postgres password from the command line. Even then i was able to type "psql template1 postgres" to log into postgresql and it didnt ask me for a password even after i set one for myself. DUH!

    Next, the reason why this doesnt work is because the user is not given access to create db's, here look!!!!!!!!!!!!!

    template1=# SELECT * from pg_shadow;
    usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | passwd | valuntil
    --------------+----------+-------------+----------+----------+-----------+-------------+----------
    postgres | 1 | t | t | t | t | mypw |
    s2h7bdb_test | 101 | f | f | f | f | tester |
    s2h7bdb | 100 | f | f | f | f | tester |
    (3 rows)

    WOW this forum really compressed the above output. Try to follow it if you can. View the |'s and read between the lines.

    Under the usercreatedb the value is set to F = False. :confused:

    This means the user is not given access to create a DB no matter what he does in the control panel.

    I trying creating a db while logged into one of my user control panel which resulted in the other two entries being created, you can see above, but those are only usernames, clearly they are not permitted to create a db's. No wonder nobody can create one from the control panel. They are restricted from doing so. After alot of messing about I was able to log into phpPgAdmin. I must say i was shocked, but that was because i worked it out! But no databases existed and i was told i was not allowed to create a db when i was logged into phpPgAdmin.

    After i logged into phpPgAdmin from a user control panel i got this msg

    SQL error:
    ERROR: CREATE DATABASE: permission denied


    In statement:
    CREATE DATABASE "mydb"


    Databases: Create database

    Clearly a permission problem here boys!!!!!!!!!!!!


    Then this is interesting. There is two pgsql directories when you run /scripts/installpostgresql. One is located at

    root@srv07 [/usr/share/pgsql]# dir
    ./ ../ backup/ pg_hba.conf.sample pg_ident.conf.sample postgres.bki postgres.description postgresql.conf.sample
    root@srv07 [/usr/share/pgsql]#

    WHY? I will never know. This just thows everyone off. The real directory is located at;

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

    and this is the pg_hba.conf that needs to be modified.

    Why is it necessary to install it in two places??

    I have been able to get as far as getting the user to be able to create a userid and password but they are not allowed to create dbs for the reasons above.
    :rolleyes:

    This issue is over 2 weeks old. I say DBRado, if you going to give us Postgresql then test the bloody thing on your test server, if you have one, before attempting to deploy it to a bunch of Cpanel users.

    BTW Turning off postgresql /etc/rc.d/init.d/postgresql stop does not remove the option for the intelligent control panel "X". The option still shows so you may want to update you change log to reflect what you really programmed because that does not work either!!!!!!!!!!!!!!!

    cPanel.net Support Ticket Number:
     
    #11 sexy_guy, Aug 13, 2003
    Last edited: Aug 13, 2003
  12. illusionfxnet

    illusionfxnet Registered

    Joined:
    Aug 9, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    /scripts/installpostgres is what i ment. Sorry about that.

    cPanel.net Support Ticket Number:
     
  13. illusionfxnet

    illusionfxnet Registered

    Joined:
    Aug 9, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Good question... I don't know why it is working, but it is. Users are able to create databases without any errors. phpPgAdmin isn't working, but it is just showing a config error on the script which won't be hard to fix.

    cPanel.net Support Ticket Number:
     
    #13 illusionfxnet, Aug 13, 2003
    Last edited: Aug 13, 2003
  14. Guile

    Guile Well-Known Member

    Joined:
    Apr 25, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Actually, after removing all rpms associated with it via:

    # rpm -qa | grep postgre
    # rpm -e anything_that_appeared_after_the_previous_command
    # rm -rf /var/lib/pgsql/data

    If did disappeared from control panel x for me on my server for all clients.

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  15. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    I said turing postgresql off not removing all the rpms. It should be watching to see if postgresql is running to determine if the icon is running not looking to see if the rpms exist.

    cPanel.net Support Ticket Number:
     
  16. Guile

    Guile Well-Known Member

    Joined:
    Apr 25, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Oppsss, my mistake, it was early for me! :D

    cPanel.net Support Ticket Number:
     
  17. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    sexy-guy,

    I don't think I would want it to work that way. Let's I am running postgresql on my box and the links are there in the client control panel. For some reason postgresql crashes and deamon is not running. Doing it the way you suggest, suddenly all the links related to postgresql would dissappear from my clients control panels. My clients would assume that I had taken feature away rather than it just being down. What if we extend your logic to other deamons on the server. Do you want all the email links to dissappear if exim is not running? What about the MySQL links if MySQL is not running?

    Just some thoughts for consideration. I, personally, am willing to wait till cpanel works out the problems with postgresql as I none of my customers are asking for it nor have they been promised it. I have installed it on a test server, but only there so I can check it out and make sure it works. All of the postgresql support is in either edge or releases and not in stables, so I would expect problems for now.

    cPanel.net Support Ticket Number:
     
  18. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
Loading...
Thread Status:
Not open for further replies.

Share This Page