Can't to log in postgres account by pgAdminHow do I install Postgres Graphical Installer?Postgres password authentication failsHelp Connecting Ubuntu Server 14.04 VM/postgres to postgreSQL workbench on localhost?“postgres: command not found” / after regular install of postgres and configure new data directorypgadmin3 doesn't detect postgresCannot open postgresql pg_hba file

Better method to measure the time period of a pendulum

Grammar and Meaning in Context of EIUS

What can I do at Hong Kong Airport for 13 hours?

Is it possible to pull or pull out a machine gun if it's already in your hand?

A story in which God (the Christian god) is replaced

Pay everything now or gradually?

How many flight hours do the first retiring A380s have?

Is there any possible way to automatically update the locators when developer changes the locators

Why should interrupts be short in a well configured system?

Why does General Grievous say “Ah yes, the negotiator?”

Are there parts of a SHA-512 hash that occur more often then others?

Chess Tournaments without Studying Theory?

Nested theorem label

How long must a US passport be valid when visiting Brazil?

Is a job offer letter with no mention of salary structure legal or correct?

Sending non-work emails to colleagues. Is it rude?

Was X17 predicted before it was observed?

Clockwise matrix rotation

Aliens kill as an art form, surprised that humans don't appreciate

What milk and yoghurt is the best for mango lassi?

Are these pigtails inside the panel and outside a junction box allowed?

Is it normal to not be able to work 8 hours a day?

How will the next Sanhedrin function if we lost the original Semicha?

Finding a solution to a linear program with a small number of zeros



Can't to log in postgres account by pgAdmin


How do I install Postgres Graphical Installer?Postgres password authentication failsHelp Connecting Ubuntu Server 14.04 VM/postgres to postgreSQL workbench on localhost?“postgres: command not found” / after regular install of postgres and configure new data directorypgadmin3 doesn't detect postgresCannot open postgresql pg_hba file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















Before I changed my forgotten postgres pass using 'su - root' in command line.
Then I try to connect server using pgAdmin and I get error:



Error connecting to the server: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"


But in command line I successfully log in postgres account:



su - postgres









share|improve this question

































    0


















    Before I changed my forgotten postgres pass using 'su - root' in command line.
    Then I try to connect server using pgAdmin and I get error:



    Error connecting to the server: FATAL: password authentication failed for user "postgres"
    FATAL: password authentication failed for user "postgres"


    But in command line I successfully log in postgres account:



    su - postgres









    share|improve this question





























      0













      0









      0








      Before I changed my forgotten postgres pass using 'su - root' in command line.
      Then I try to connect server using pgAdmin and I get error:



      Error connecting to the server: FATAL: password authentication failed for user "postgres"
      FATAL: password authentication failed for user "postgres"


      But in command line I successfully log in postgres account:



      su - postgres









      share|improve this question
















      Before I changed my forgotten postgres pass using 'su - root' in command line.
      Then I try to connect server using pgAdmin and I get error:



      Error connecting to the server: FATAL: password authentication failed for user "postgres"
      FATAL: password authentication failed for user "postgres"


      But in command line I successfully log in postgres account:



      su - postgres






      postgresql






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 10 '15 at 10:53









      hg8

      11.6k12 gold badges60 silver badges95 bronze badges




      11.6k12 gold badges60 silver badges95 bronze badges










      asked Nov 10 '15 at 10:05









      AlexAlex

      11 silver badge1 bronze badge




      11 silver badge1 bronze badge























          1 Answer
          1






          active

          oldest

          votes


















          0



















          There's a postgres unix user account password, which you can change using passwd as root.



          There is also a totally unrelated postgres role in the database, which might have a password of its own. This is totally unaffected by the passwd command. If you have forgotten this password, you have to reset it within PostgreSQL. See:



          • https://stackoverflow.com/q/10845998/398670

          • https://dba.stackexchange.com/q/19643/7788

          etc.



          The reason it works from psql but not PgAdmin is probably that you'll be using a unix socket with psql, using peer authentication to bypass password auth completely. If you've got localhost in your connection setup for PgAdmin it'll use TCP/IP instead, which is probably set to require md5 password authentication. Check your pg_hba.conf to confirm.






          share|improve this answer



























          • I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

            – Alex
            Nov 11 '15 at 10:21












          • @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

            – Craig Ringer
            Nov 11 '15 at 10:24











          • Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

            – Alex
            Nov 11 '15 at 10:36












          • Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

            – Alex
            Nov 11 '15 at 10:43













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f696187%2fcant-to-log-in-postgres-account-by-pgadmin%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0



















          There's a postgres unix user account password, which you can change using passwd as root.



          There is also a totally unrelated postgres role in the database, which might have a password of its own. This is totally unaffected by the passwd command. If you have forgotten this password, you have to reset it within PostgreSQL. See:



          • https://stackoverflow.com/q/10845998/398670

          • https://dba.stackexchange.com/q/19643/7788

          etc.



          The reason it works from psql but not PgAdmin is probably that you'll be using a unix socket with psql, using peer authentication to bypass password auth completely. If you've got localhost in your connection setup for PgAdmin it'll use TCP/IP instead, which is probably set to require md5 password authentication. Check your pg_hba.conf to confirm.






          share|improve this answer



























          • I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

            – Alex
            Nov 11 '15 at 10:21












          • @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

            – Craig Ringer
            Nov 11 '15 at 10:24











          • Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

            – Alex
            Nov 11 '15 at 10:36












          • Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

            – Alex
            Nov 11 '15 at 10:43
















          0



















          There's a postgres unix user account password, which you can change using passwd as root.



          There is also a totally unrelated postgres role in the database, which might have a password of its own. This is totally unaffected by the passwd command. If you have forgotten this password, you have to reset it within PostgreSQL. See:



          • https://stackoverflow.com/q/10845998/398670

          • https://dba.stackexchange.com/q/19643/7788

          etc.



          The reason it works from psql but not PgAdmin is probably that you'll be using a unix socket with psql, using peer authentication to bypass password auth completely. If you've got localhost in your connection setup for PgAdmin it'll use TCP/IP instead, which is probably set to require md5 password authentication. Check your pg_hba.conf to confirm.






          share|improve this answer



























          • I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

            – Alex
            Nov 11 '15 at 10:21












          • @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

            – Craig Ringer
            Nov 11 '15 at 10:24











          • Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

            – Alex
            Nov 11 '15 at 10:36












          • Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

            – Alex
            Nov 11 '15 at 10:43














          0















          0











          0









          There's a postgres unix user account password, which you can change using passwd as root.



          There is also a totally unrelated postgres role in the database, which might have a password of its own. This is totally unaffected by the passwd command. If you have forgotten this password, you have to reset it within PostgreSQL. See:



          • https://stackoverflow.com/q/10845998/398670

          • https://dba.stackexchange.com/q/19643/7788

          etc.



          The reason it works from psql but not PgAdmin is probably that you'll be using a unix socket with psql, using peer authentication to bypass password auth completely. If you've got localhost in your connection setup for PgAdmin it'll use TCP/IP instead, which is probably set to require md5 password authentication. Check your pg_hba.conf to confirm.






          share|improve this answer
















          There's a postgres unix user account password, which you can change using passwd as root.



          There is also a totally unrelated postgres role in the database, which might have a password of its own. This is totally unaffected by the passwd command. If you have forgotten this password, you have to reset it within PostgreSQL. See:



          • https://stackoverflow.com/q/10845998/398670

          • https://dba.stackexchange.com/q/19643/7788

          etc.



          The reason it works from psql but not PgAdmin is probably that you'll be using a unix socket with psql, using peer authentication to bypass password auth completely. If you've got localhost in your connection setup for PgAdmin it'll use TCP/IP instead, which is probably set to require md5 password authentication. Check your pg_hba.conf to confirm.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited May 23 '17 at 12:39









          Community

          1




          1










          answered Nov 10 '15 at 10:13









          Craig RingerCraig Ringer

          3,6441 gold badge18 silver badges15 bronze badges




          3,6441 gold badge18 silver badges15 bronze badges















          • I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

            – Alex
            Nov 11 '15 at 10:21












          • @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

            – Craig Ringer
            Nov 11 '15 at 10:24











          • Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

            – Alex
            Nov 11 '15 at 10:36












          • Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

            – Alex
            Nov 11 '15 at 10:43


















          • I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

            – Alex
            Nov 11 '15 at 10:21












          • @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

            – Craig Ringer
            Nov 11 '15 at 10:24











          • Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

            – Alex
            Nov 11 '15 at 10:36












          • Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

            – Alex
            Nov 11 '15 at 10:43

















          I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

          – Alex
          Nov 11 '15 at 10:21






          I've changed pg_hba.conf. I put 'trust' in place of 'peer'/'md5' of localhost.

          – Alex
          Nov 11 '15 at 10:21














          @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

          – Craig Ringer
          Nov 11 '15 at 10:24





          @Alex If you did so for both host and local lines, and reloaded/restarted PostgreSQL, you should be able to log in fine. Though of course so can anyone else with access to your machine.

          – Craig Ringer
          Nov 11 '15 at 10:24













          Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

          – Alex
          Nov 11 '15 at 10:36






          Yes, I restarted Postgres Server. It's a part of pg_hba.conf Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust

          – Alex
          Nov 11 '15 at 10:36














          Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

          – Alex
          Nov 11 '15 at 10:43






          Ouch. I did it :) It seems I didn't close pg_hba.conf and tried to connect server)

          – Alex
          Nov 11 '15 at 10:43



















          draft saved

          draft discarded















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f696187%2fcant-to-log-in-postgres-account-by-pgadmin%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?