Re: {I} One Information required...

From: Q Beukes <pgsql-dev(at)list(dot)za(dot)net>
To: Postgresql Dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: {I} One Information required...
Date: 2006-02-09 15:10:18
Message-ID: 43EB5B5A.3040602@list.za.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hey,

Simply create a new non adminstrator user, say "postgres" with a password.
Give this user write permissions to the empty data directory.

Then login as this user and run initdb like did before.

You are going to have to register the postgres service under this user too.
You can do this by running pg_ctl like this:
> pg_ctl.exe register -N PostgreSQL -U [user] -P [user password]

After this you can run:
> net start PostgreSQL
to start postgres, or you can use the windows tool to start/stop services.

If you dont want to register the service you will have to login to this
user everytime
in order to start postgresql. Services are a handy Windows feature.

There is also a tool in windows with which you can run commands under
other users, similiar to "su" in linux, but I can't remember the name.
Google for it if you wish
to take this route.

any questions feel free to mail me ;>
regards
Quintin Beukes

Premnath, KN wrote:

> Hi all,
> When I try to run "initdb" id get the messing "creating
> template1 database in c:/postgres/data/base/1 ... Execution of PostgreS
>
> QL by a user with administrative permissions is not permitted. The
> server must be started under an unprivileged user ID to prevent
> possible system security compromises. See the documentation for
>
> more information on how to properly start the server."
> OS I am using : "Windows 2000 Professional"
>
> I understand this message. Actually I created a new user
> "postgres" with password as different than "postgres", also gave
> permission to the "c:\postgres" (installation folder) with "postgres"
> user permission. When I specify "runas /noprofile /user:postgres cmd"
> and then when I specify "initdb" I am getting the above error message,
> this is with Postgres 8.1, in the past with postgres 7.x I am not
> facing this problem.
>
> One surprising observation what I see is that => when I run
> "initdb" the cmd shell is showing "The files belonging to this
> database system will be owned by user "pk00xxxx".
>
> This user must also own the server process." where "pk00xxxx" is the
> machine what I logged in.
>
> *Question:*
> * How to configure "initdb" to use "postgres" instead of
> "pk00xxxx" user. Anyone kindly help in this regard.*
>
> Thank You.
>
> With warm regards,
> */Premnath.k.n/*
>
> Siemens Communication Software,
> 2nd floor, Shankara Narayana Building-1,
> 25/1 Mahatma Gandhi Road,
> Bangalore - 560 001,
> India.
> /Phone: Off : 91-80-2506 2400, 2559 4067 - 73 /
> / Extn : 6369/
> / Fax : 91-80-2506 2406/
> / Resi : 91-80-28436106/
> / Mobile: 91-98445 19798/
> /Email: Premnath(dot)kn(at)siemens(dot)com/
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-09 15:14:16 Re: PostgreSQL 8.0.6 crash
Previous Message Andrew Dunstan 2006-02-09 15:10:14 Re: Upcoming re-releases