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

  • SEARCH
  • Home
  • 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 8873345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:26:33+00:00 2026-06-14T18:26:33+00:00

When i try to login from command line like this psql -h dbserver -U

  • 0

When i try to login from command line like this

psql -h dbserver -U testuser test

then i get this error

psql: FATAL:  Ident authentication failed for user "testuser"

This is my

nano -w /var/lib/pgsql/data/pg_hba.conf

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          password
# IPv6 local connections:
host    all         all         ::1/128               ident
host    all     all     192.168.0.1/24  password
  • 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-06-14T18:26:34+00:00Added an answer on June 14, 2026 at 6:26 pm

    You can’t specify a non-default user with -U in psql when using ident authentication. You won’t be running psql as that user, so auth will fail.

    You must either use sudo -u testuser psql test or change pg_hba.conf so that authentication (at least for testuser on the db test) uses md5 password authentication, and set a password for testuser with ALTER USER ... PASSWORD if they don’t have one already.

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

Sidebar

Related Questions

I cannot login using email in CakePHP 2.1, when i try with username then
I am working in a Login page and teh logic is like -> try
I have written a Java application that runs from the command line. I want
When I try to login to our WSS demo site the authentication popup forces
I try to provide a login with the facebook-php-sdk. But, when I click on
When try to access site i created after 3 login attempts it gives unauthorised
I'm creating a login for a website using PHP but when I try to
I'm try to use drupal open id module. When i used to login using
I've been trying to override the file login.xml but no matter what I try,
I followed this tutorial . But whenever I try to log in with my

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.