Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pEssK-0005Nt-ND for pgsql-general@arkaria.postgresql.org; Mon, 09 Jan 2023 14:11:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pEssJ-0006g2-JB for pgsql-general@arkaria.postgresql.org; Mon, 09 Jan 2023 14:11:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pEssJ-0006ft-6h for pgsql-general@lists.postgresql.org; Mon, 09 Jan 2023 14:11:43 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pEssG-0001iI-JF for pgsql-general@lists.postgresql.org; Mon, 09 Jan 2023 14:11:42 +0000 Received: by mail-ot1-x331.google.com with SMTP id y18-20020a0568301d9200b0067082cd4679so5219048oti.4 for ; Mon, 09 Jan 2023 06:11:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pdEmJcl4ZivlgWxyjnuiJaZ/fENGd4VSrP5AOD9EiZU=; b=FtlC60kStjZXBhLoJdbkCTfpRaw+7xJQGYW8Fpd+mehI3PWJcyIwjBRu1uwAxspKtD yZfPdV4Ot/Dh/Mj0ulrCoJDVyE1z8VRlF68y4vzwWn3cu9z5Xr+hPKhhL21NbeRuwVlr mrTKmTplijPX6FMYW+0B0WKF/yX/dqezR6rCwAY4Pe3hGaCnR+A2Sy4qDDlK71C+15p6 H1V5jwaNT9hFbGmFGdfzRt+FUB4SMm8Dl/w1vzzF9RT7HV+FNPjQIi+nmJNU+SaGzIN2 XY3j2UXucj0/ws8iqccg9NctnNnt7NRL+wj+4JejDwHHwVljtsTypiRjIwEUre2UZXmj A9WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pdEmJcl4ZivlgWxyjnuiJaZ/fENGd4VSrP5AOD9EiZU=; b=WrnblFmk5Z93fSh1RbEouLjhJOXlrt5DEFGl9wpB/HDjxX/V9lty0xmWQZOGR6vON6 6tVIATEhRk5UnFRQuq5zkM4FiHM8iAFhN/9FMeAWxytca9EvbGW7mUcLqg7RZKIaSbMZ OoPsZ0JYrEbspFzEYRl6YXALP3BupW9uOjz9Wv1qXpDEd/wWoZW2h366Oj7/v5dR9u7z 6GHOpEqhWhBJFVhdtUOo42fpq5+jhnwZzxcXKFmazVswIZCzQsJWYEFuF++gnyRv7CEx 0fn69Dt8oNZFHGq8N12eAzYIBzqEfeBgVBvkN+ABwNZNrauFOYv/y/7GwVsr9tDqgO4v Yb1g== X-Gm-Message-State: AFqh2kol4PwDidF32JRpre5wpyWf/QO16EwDSTgKjwCtow+wpDbKWCJV A6fDjErCNMjzgvE/uBSIijZjFwm2qfk= X-Google-Smtp-Source: AMrXdXtGGIoJn/CRZt/Zav49QMRSG+usf83NByes6ZKyaxpp12x8xa1+N1dgeFl6Oor17yEc8P6UdQ== X-Received: by 2002:a05:6830:1652:b0:663:d2b5:38e7 with SMTP id h18-20020a056830165200b00663d2b538e7mr32019405otr.21.1673273497797; Mon, 09 Jan 2023 06:11:37 -0800 (PST) Received: from [192.168.1.66] (108-250-206-84.lightspeed.nworla.sbcglobal.net. [108.250.206.84]) by smtp.googlemail.com with ESMTPSA id cp17-20020a056830661100b00670763270fcsm4596371otb.71.2023.01.09.06.11.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Jan 2023 06:11:36 -0800 (PST) Message-ID: <43c0a715-9bb0-b679-469b-b64ddacd4139@gmail.com> Date: Mon, 9 Jan 2023 08:11:35 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: How do the Linux distributions create the Linux user/group "postgres"? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <20230109124157.GA11@sh4-5.1blu.de> <29d6cd01-df1d-e009-9293-2229d5ba3d19@joeconway.com> From: Ron In-Reply-To: <29d6cd01-df1d-e009-9293-2229d5ba3d19@joeconway.com> 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 1/9/23 07:15, Joe Conway wrote: > On 1/9/23 07:41, Matthias Apitz wrote: >> Please note: I'm talking about the user and group "postgres" in the >> Linux OS and not in the PostgreSQL server. >> >> We're compiling PostgreSQL from source (actually 14.1) and distribute that >> to our customers. They're asked to setup user and group "postgres" >> before creating the cluster. As nowadays there are a lot of setup such >> things in bigger installations, like LDAP or AD, etc. I'd like to know >> how other installations for Linux deal with this? > > See for example the PGDG RPM spec file: > > https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/main/non-common/postgresql-15/main/postgresql-15.spec;h=60cd42147a7563ba76c401643d0a7c79b59d2520;hb=HEAD > > > 8<------------------- > %pre server > groupadd -g 26 -o -r postgres >/dev/null 2>&1 || : > useradd -M -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ >     -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : > 8<------------------- What if (for example in an already-installed package) uid and gid 26 already exist? -- Born in Arizona, moved to Babylonia.