Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6668261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:01:21+00:00 2026-05-26T03:01:21+00:00

I have installed PostgreSQL 8.4, Postgres client and Pgadmin 3. Authentication failed for user

  • 0

I have installed PostgreSQL 8.4, Postgres client and Pgadmin 3. Authentication failed for user “postgres” for both console client and Pgadmin. I have typed user as “postgres” and password “postgres”, because it worked before. But now authentication is failed. I did it before a couple of times without this problem. What should I do? And what happens?

psql -U postgres -h localhost -W
Password for user postgres: 
psql: FATAL:  password authentication failed for user "postgres"
FATAL:  password authentication failed for user "postgres"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:01:22+00:00Added an answer on May 26, 2026 at 3:01 am

    If I remember correctly the user postgres has no DB password set on Ubuntu by default. That means, that you can login to that account only by using the postgres OS user account.

    Assuming, that you have root access on the box you can do:

    sudo -u postgres psql
    

    If that fails with a database "postgres" does not exists error, then you are most likely not on a Ubuntu or Debian server 🙂 In this case simply add template1 to the command:

    sudo -u postgres psql template1
    

    If any of those commands fail with an error psql: FATAL: password authentication failed for user "postgres" then check the file /etc/postgresql/8.4/main/pg_hba.conf: There must be a line like this as the first non-comment line:

    local   all         postgres                          ident
    

    For newer versions of PostgreSQL ident actually might be peer. That’s OK also.

    Inside the psql shell you can give the DB user postgres a password:

    ALTER USER postgres PASSWORD 'newPassword';
    

    You can leave the psql shell by typing CtrlD or with the command \q.

    Now you should be able to give pgAdmin a valid password for the DB superuser and it will be happy too. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just installed PostgreSQL 8.3.4 on Mac OS X 10.5 (using ports), but
I have a Tomcat and PostgreSQL installed on a server. I'm having a connection
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly
I have installed PostgreSQL and pgAdminIII on my Ubuntu Karmic box. I am able
Well, I have MAMP installed on my Mac OS X, and I've got PostGres
I have a little silly question. I have installed a PostgreSQL DB Server, but
I have installed PostgreSQL and it is working ok. However, when I went to
I have Postgres version 8.4.8 select version(); PostgreSQL 8.4.8 on i686-pc-linux-gnu, compiled by GCC
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.