From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Alban Hertroys <haramrae(at)gmail(dot)com>, Amn Ojee Uw <amnojeeuw(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Nu-B here |
Date: | 2023-07-20 14:41:44 |
Message-ID: | a8b3fac8-d6f9-fc04-4f2b-68a69cb66f55@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 7/19/23 23:32, Alban Hertroys wrote:
>
>> On 20 Jul 2023, at 02:36, Amn Ojee Uw <amnojeeuw(at)gmail(dot)com> wrote:
>>
>> After this command 'sudo -u postgres psql'
>> I get this message :
>> could not change directory to "/home/my_account": Permission denied
>
> What’s the reason that you’re using the OS user postgres?
Because the Debian/Ubuntu packaging sets up pg_hba.conf to use peer auth
for local connections and the only database user created is postgres.
See:
https://ubuntu.com/server/docs/databases-postgresql
for more information.
>
> If you’re simply trying to connect to the database named postgres as database user postgres, you can instead use the command 'psql -U postgres postgres’.
>
> Alban Hertroys
> --
> If you can't see the forest for the trees,
> cut the trees and you'll find there is no forest.
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2023-07-20 14:48:19 | Re: How to improve the performance of my SQL query? |
Previous Message | Anthony Apollis | 2023-07-20 14:28:33 | Fwd: TSQL To Postgres - Unpivot/Union All |