public inbox for [email protected]  
help / color / mirror / Atom feed
initdb
3+ messages / 3 participants
[nested] [flat]

* initdb
@ 2018-01-15 21:30 PG Doc comments form <[email protected]>
  2018-01-15 21:56 ` Re: initdb Tom Lane <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2018-01-15 21:30 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/app-initdb.html
Description:

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

According to the documentation this should have failed.  This is on centos
kernel version 3.10.0-693.11.6 and I was using the 9.6 repo.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: initdb
  2018-01-15 21:30 initdb PG Doc comments form <[email protected]>
@ 2018-01-15 21:56 ` Tom Lane <[email protected]>
  2018-01-15 22:11   ` Re: initdb Scott Watson <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2018-01-15 21:56 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

=?utf-8?q?PG_Doc_comments_form?= <[email protected]> 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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: initdb
  2018-01-15 21:30 initdb PG Doc comments form <[email protected]>
  2018-01-15 21:56 ` Re: initdb Tom Lane <[email protected]>
@ 2018-01-15 22:11   ` Scott Watson <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Scott Watson @ 2018-01-15 22:11 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: [email protected]

Hi Tom,

I was running initdb command when calling the postgresql96-setup command.
  Trying to run this as the user postgres failed.

/usr/pgsql-9.6/bin/postgresql96-setup initdb

The database was created under /var/lib/pgsql/9.6/data

thanks
Scott.


On Mon, Jan 15, 2018 at 4:56 PM, Tom Lane <[email protected]> wrote:

> =?utf-8?q?PG_Doc_comments_form?= <[email protected]> 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
>


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-01-15 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 21:30 initdb PG Doc comments form <[email protected]>
2018-01-15 21:56 ` Tom Lane <[email protected]>
2018-01-15 22:11   ` Scott Watson <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox