Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I currently have a 9.3 server running (on Ubuntu 14.04) with "trust" set as the authentification method in pg_hba.conf. How can I set the password again. In pgadmin the server currently doesn't allow me to access the console (The PSQL console closes immediately after I open it).

I have the feeling that setting the password using

     $ sudo -u postgres psql

changes the password of a parallel running 9.1 server.

Using

     psql -U postgres

gives an error saying

   psql: FATAL:  Peer-Authentifizierung für Benutzer »postgres« fehlgeschlagen

(peer authentification for user postgres failed)

pg_hba.conf

    # Database administrative login by Unix domain socket
    local   all             postgres                                trust

    # TYPE  DATABASE        USER            ADDRESS                 METHOD

    # "local" is for Unix domain socket connections only
    local   all             all                                     trust
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            md5
    # IPv6 local connections:
    host    all             all             ::1/128                 md5
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     postgres                                peer
    #host    replication     postgres        127.0.0.1/32            md5
    #host    replication     postgres        ::1/128                 md5

Setting password in pgadmin

After setting the password for the postgres user (1), the ENCRYPTED PASSWORD appears in pgadmin (2), but psql -U postgres still fails.

enter image description here

Previous question:

share|improve this question
    
@a_horse_with_no_name - pinging –  Spießbürger May 9 at 9:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.