Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0SuA-00BaIH-10 for pgsql-general@arkaria.postgresql.org; Mon, 14 Oct 2024 21:47:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t0Su7-0007VL-Fq for pgsql-general@arkaria.postgresql.org; Mon, 14 Oct 2024 21:47:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0Su6-0007VD-2o for pgsql-general@lists.postgresql.org; Mon, 14 Oct 2024 21:47:03 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0Su3-000tvt-2A for pgsql-general@lists.postgresql.org; Mon, 14 Oct 2024 21:47:01 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6A13B114016B; Mon, 14 Oct 2024 17:46:57 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 14 Oct 2024 17:46:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1728942417; x=1729028817; bh=LQZTOJvU6evrTFI34PwQLme5CKycuEpjxojysWVhOCU=; b= NcQIUGf/WngmHWha9o33FUDSsSLS50JkMMPfz2a/avViKZNTPn2uaka/G6rAMPyW Tlkb1iBhvw2qw8H1wXfLFl4GYeY1ToN+ZFPK0+zuuHpwRAnGWiZqHiy4ChFZiPtq XZ2CVNe8lB+dfkvu76wEuFO/zb+ZRfkxgzsS7lof9GgcpwQvjZh7+mAkEaZYea8r foB4XUsqHceUVykryqvFgbn0ISJJLMQJsQDPNNsdSKulXAGJoTGoTBDGftOR+6oe dq6NtIDoazV047p0c2sGLUb/a3zPqDCIChC0yMqcdJB01xNjg4wXCEeIyOoonF8+ D+EfkmVsLKwA84RB6c2Tvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728942417; x= 1729028817; bh=LQZTOJvU6evrTFI34PwQLme5CKycuEpjxojysWVhOCU=; b=j b9Xiz372qRRnKFJ6FPmygBM9nPe6R0tG/32r3HtbrHIn0Md0cmR2Oi1iFc+AOsSk LmaA/RivEk7FvpZdveI8KIp8AXUZFroIUjcNC6pvoh7ryRt/Wnj1sKF/j0+4AoRP 9LG1ethh+lHq0NmuLeNnRxgX6pZGWtLmQfzYPmCLMwQZlboY70s1A42yU/D3XleK uF+3pe2g28HPhmQlMluNO0F5XKjg+R/WvdYjV/tYpaeCKAZUhh9cxRtdhV2D7/uW 2JCq3mNgMR/qOWL9CXq47BfJPc1GBKlTuTvoOIEHG9adXh/HCFxkq0Q9dACzdgkA U7kZ9P350YDRdEIi/0/Eg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegiedgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeen ucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrse grkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeefkedukeetvedugeffvddu jeethfeigfeuheetfefhudelvddtieevuddvteefvdenucffohhmrghinhepphhoshhtgh hrvghsqhhlrdhorhhgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrg hvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgt phhtthhopegtrgiifigrrhhhrghmsehhohhtmhgrihhlrdgtohhmpdhrtghpthhtohepph hgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Oct 2024 17:46:56 -0400 (EDT) Message-ID: <685640e7-4533-4483-acfc-d8dc60de5515@aklaver.com> Date: Mon, 14 Oct 2024 14:46:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Changing postgres User To: Zac Warham , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 > > > Thanks, > Zac -- Adrian Klaver adrian.klaver@aklaver.com