pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amn Ojee Uw <amnojeeuw@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL - How to login with my Linux user account
Date: Fri, 28 Jul 2023 10:00:11 -0400
Message-ID: <30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com> (raw)
In-Reply-To: <ae4781f7-5221-0ea3-e2ed-611bd5078409@gmail.com>
References: <ae4781f7-5221-0ea3-e2ed-611bd5078409@gmail.com>

First of all, my gratitude to Adrian and David for taking the time to 
reply to my call for help; a 1k  thanks to you kids.

Having stated the above, PostgreSQL provides a default database namely 
'postgres'. Taking advantage of this service, I have change the 'psql' 
statement to 'psql -d postgres -U my_linux_user_name -W', I then entered 
my Linux account login password and got this error messages :
/*$ psql -d postgres -U my_linux_user_name -W *//*
*//*Password: *//*
*//*psql: error: connection to server on socket 
"/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication 
failed for user "my_linux_user_name"*/

I also, using 'postres' account, have created another user account, 
chispa, who is a superuser; when trying to login as 'chispa' and using 
the above statement (/*psql -d postgres -U chispa -W *//*)*/ PostgreSQL 
throws the same error message.
/**/

What am I doing wrong?
Is there a webpage that explains how to login to PostgreSQL as other 
than 'postgres'?


Thanks in advance.

On 7/27/23 8:19 p.m., Amn Ojee Uw wrote:
> psql -d mydb -U myuser -W

view thread (6+ messages)  latest in thread

Message-ID: <30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com>
Permalink:  ../30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com/
Also on:    postgresql.org/message-id/30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: amnojeeuw@gmail.com
  Subject: Re: PostgreSQL - How to login with my Linux user account
  In-Reply-To: <30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com>
  References: <ae4781f7-5221-0ea3-e2ed-611bd5078409@gmail.com> <30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox