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 8726599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:16:52+00:00 2026-06-13T08:16:52+00:00

I just started playing around with PostgreSQL. My goal is to create a new

  • 0

I just started playing around with PostgreSQL. My goal is to create a new user outside of postgres with all of the same privileges and create a database for my ror app. I’m able to login under postgres. I did create an user named Jason, which is good, however when I do sudo -u username psql I receive the following error…

sudo: unknown user: Jason
sudo: unable to initialize policy plugin

I can determine that the username exists by checking both \dg in my postgres console.

                         List of roles
Role name |                   Attributes                   | Member of 
-----------+------------------------------------------------+-----------
Jason     | Superuser, Create role, Create DB, Replication | {}
postgres  | Superuser, Create role, Create DB, Replication | {}

What’s causing this problem? Also, I checked my local pg_hba.conf and have what I believe to be the correct settings.

# 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
  • 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-13T08:16:53+00:00Added an answer on June 13, 2026 at 8:16 am

    You are confusing system user with database user. The error message comes from sudo and has nothing to do with PostgreSQL at all.

    To log in as database user Jason:

    psql -U Jason
    

    You need to supply a password, of course, as long as password-less access is not set up. Peer authentication only works for a system user of the same name (“Jason”).
    More in the excellent manual about psql here and about authentication methods here.

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

Sidebar

Related Questions

I'm new to cmake and have just started playing around with it. My problem
I have no experience at all with OpenGL and just started playing around with
Hello I am new to animations and just started playing around with it recently.
Just started playing around with ice_cube I've got a weekly schedule (with a granularity
I just started playing around with threading today and I ran into something that
I just started playing around with the 960 CSS framework and found that it
I'm just started on playing around with the canvas HTML5-object. For the sake of
I'm just getting started with ASP.NET MVC 2, and playing around with Validation. Let's
I just started playing around with WPF today, and I couldn't find the datagridview
Ok...so I've just started playing around with Codeigniter. I've followed the two tuts on

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.