Re: Changing postgres User

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Zac Warham <cazwarham(at)hotmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Changing postgres User
Date: 2024-10-14 21:46:55
Message-ID: 685640e7-4533-4483-acfc-d8dc60de5515@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/14/24 13:11, Zac Warham wrote:
> Hi,
>
> We are trying to setup a postgresql Docker container alongside pgadmin
> and caddy for use in the PrairieLearn student testing software. Our main
> set back is that the PrairieLearn production environment user runs as
> user 1001:1001 and as such we have had to rename the postgres user
> within Linux to 1001 and alter the credentials management significantly.

Why?

Per:

https://www.postgresql.org/docs/current/app-initdb.html

You can have the initdb create the cluster as any user:

"-U username
--username=username

Sets the user name of the bootstrap superuser. This defaults to the
name of the operating-system user running initdb.
"

>
> We are currently brainstorming some better ways but if anyone has any
> suggestions on easier ways to make these changes then we would
> appreciate them. The code is open source and can be viewed here -
> https://github.com/PrairieLearn/PrairieLearn/pull/10713
> <https://github.com/PrairieLearn/PrairieLearn/pull/10713>
>
> Thanks,
> Zac

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zac Warham 2024-10-14 22:09:59 Re: Changing postgres User
Previous Message Durgamahesh Manne 2024-10-14 20:43:31 Re: How to Copy/Load 1 billions rows into a Partition Tables Fast