Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebCjj-0002IT-NQ for pgsql-docs@arkaria.postgresql.org; Mon, 15 Jan 2018 21:56:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebCjj-0004T6-43 for pgsql-docs@arkaria.postgresql.org; Mon, 15 Jan 2018 21:56:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebCji-0004Sv-SA for pgsql-docs@lists.postgresql.org; Mon, 15 Jan 2018 21:56:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ebCjg-0006Of-22 for pgsql-docs@lists.postgresql.org; Mon, 15 Jan 2018 21:56:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0FLu6ch010689; Mon, 15 Jan 2018 16:56:06 -0500 From: Tom Lane To: rscottwatson@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: initdb In-reply-to: <20180115213024.3624.26539@wrigleys.postgresql.org> References: <20180115213024.3624.26539@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Doc_comments_form?= message dated "Mon, 15 Jan 2018 21:30:24 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10687.1516053366.1@sss.pgh.pa.us> Date: Mon, 15 Jan 2018 16:56:06 -0500 Message-ID: <10688.1516053366@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Doc_comments_form?= writes: > So I was trying to create a new db with initdb. I tried to run this with > the postgres user after installing the server rpm and it failed with runuser > may not be run as non-root users. So then for fun I tried to run init db > as the root user which should have failed but instead it just reported > initializing database ... OK hmm, worksforme: $ sudo initdb -D someplace initdb: cannot be run as root Please log in (using, e.g., "su") as the (unprivileged) user that will own the server process. Were you actually running initdb directly, or some script that perhaps sudo'd internally? regards, tom lane