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 1t0Udg-00Bj0B-IK for pgsql-general@arkaria.postgresql.org; Mon, 14 Oct 2024 23:38:13 +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 1t0Udd-000vX0-HM for pgsql-general@arkaria.postgresql.org; Mon, 14 Oct 2024 23:38:09 +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 1t0Udc-000vVr-0j for pgsql-general@lists.postgresql.org; Mon, 14 Oct 2024 23:38:09 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0UdY-000ujx-DY for pgsql-general@lists.postgresql.org; Mon, 14 Oct 2024 23:38:06 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id D2E8B11400F7; Mon, 14 Oct 2024 19:38:02 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Mon, 14 Oct 2024 19:38:02 -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=1728949082; x=1729035482; bh=/qFjs6RtLnbp1duuEwj1BjggxKZVpmd2cSs+Gv29RzQ=; b= m9Yz/jiwhdXs/4vDkddMSdJhXS+X0cwlvhEDnlgd8avL0/Uemu/jS0i2xTXdEUzJ UW09w1V7+Da0tl+OP8414TlEc3g/neY27T1CdiSSyZOg7mQ2/zwezeHgjahciv9q mMXEQwQjZbF4n7W7GxNQIpl1Znw/kYxjokQfPUeCfBNZq4pALhyC65q3kkKUcGsX qSk2FdhkanNRccEt423rS57XWeE8/2UlPplRtgD7yf5KhuB5yXJcCVS39WicjLly nY4/dlPnhIY3jZovUwCk0ZWySTywppxZ4epryQDCzUM5fDInu7vopAIK5wcSeV49 xJQtHJ78prPzn0jKWhFBhQ== 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=1728949082; x= 1729035482; bh=/qFjs6RtLnbp1duuEwj1BjggxKZVpmd2cSs+Gv29RzQ=; b=j kfcR50okhnZziR7bYk1wyeCBg5G36S5fBvjMc59hAqW1iT6Ui+d4fQoZ2i5A3EKk v+JC/yqEohhko9pY6cs8UpuM+d4LA+Jl2Vp3WSeKUUhxXHC+bQBn+hrlbZfWJj2W vsSB8ItiMxdhrdRYNbNKKuvCMdMB03kha3YbqaQa/ZDSko46mJgzbVviuDd7gTcb dNVH6/Zps/Ujoao0o8s8eW8z0lAz6uOsYH5TanU0SDXMBoChxtRxHDGlN9Sw1KFu /yFI61xFMv2JtTbG4NuT4YWVxx/JKJVBXhsr90gVtOM1yPwjHN8zKc5n+nR3/5Ea KORJuqaIDUheO1r5PRl1A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegiedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeen ucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrse grkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeeifffgffdtteetheejgfet jeejvdefheetieeuueegvdduffevleeuuefhjeelgfenucffohhmrghinhepohhuthhloh hokhdrtghomhdpphhoshhtghhrvghsqhhlrdhorhhgpdhgihhthhhusgdrtghomhenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnh drkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohgu vgepshhmthhpohhuthdprhgtphhtthhopegtrgiifigrrhhhrghmsehhohhtmhgrihhlrd gtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshht ghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Oct 2024 19:38:01 -0400 (EDT) Message-ID: <15519d05-35a9-4c90-b0f5-adae7734b4c3@aklaver.com> Date: Mon, 14 Oct 2024 16:38:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Changing postgres User To: Zac Warham , "pgsql-general@lists.postgresql.org" References: <685640e7-4533-4483-acfc-d8dc60de5515@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/14/24 15:09, Zac Warham wrote: > Hi Adrian, > > Thank you for the link to the documentation however it is the UID and > GID of 1001:1001 that is required, not the username which I believe this > is intended for? Is there a similar option for UID and GID? Apologies if > my original question was not clear in this manner. The UID/GID map to a user and group and that is what you care about. > > Zac > ------------------------------------------------------------------------ > *From:* Adrian Klaver > *Sent:* Monday, 14 October 2024 2:46 PM > *To:* Zac Warham ; > pgsql-general@lists.postgresql.org > *Subject:* Re: Changing postgres User > 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://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fapp-initdb.html&data=05%7C02%7C%7C545e2e2790694e5ec81a08dcec99ba83%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638645392223140652%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=LNVisA1Cm%2BK8twl9PxP18kl8zcDsgo77ySEvtIuXfZI%3D&reserved=0 > > 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://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPrairieLearn%2FPrairieLearn%2Fpull%2F10713&data=05%7C02%7C%7C545e2e2790694e5ec81a08dcec99ba83%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638645392223163417%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=3Rj3%2BG4PYJIEzymBaKdl%2BbkooYroK7HzH3M2eHM2f8Y%3D&reserved=0 >> > >> >> Thanks, >> Zac > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com