Обсуждение: {I} One Information required...

Поиск
Список
Период
Сортировка

{I} One Information required...

От
"Premnath, KN"
Дата:
<p><font face="Comic Sans MS" size="2">Hi all,</font><br />        <font face="Comic Sans MS" size="2">When I try to
run"initdb" id get the messing "creating template1 database in c:/postgres/data/base/1 ... Execution of
PostgreS</font><p><fontface="Comic Sans MS" size="2">QL by a user with administrative permissions is not permitted. The
servermust be started under an unprivileged user ID to prevent possible system security compromises.  See the
documentationfor</font><p><font face="Comic Sans MS" size="2">more information on how to properly start the server." 
</font><br/>        <font face="Comic Sans MS" size="2">OS I am using : "Windows 2000 Professional"</font><p>       
<fontface="Comic Sans MS" size="2">I understand this message.  Actually I created a new user "postgres" with password
asdifferent 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
aboveerror message, this is with Postgres 8.1, in the past with postgres 7.x I am not facing this
problem.</font><p>       <font face="Comic Sans MS" size="2">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".</font><p><fontface="Comic Sans MS" size="2">This user must also own the server process." where "pk00xxxx"
isthe machine what I logged in.  </font><p><b><font face="Comic Sans MS" size="2">Question:</font></b><br /><b>       
<fontface="Comic Sans MS" size="2">How to configure "initdb" to use "postgres" instead of "pk00xxxx" user.  Anyone
kindlyhelp in this regard.</font></b><p>        <font face="Comic Sans MS" size="2">Thank You.</font><p><font
face="ComicSans MS" size="2">With warm regards,</font><br /><b><i><font color="#008080" face="Times New Roman"
size="2">Premnath.k.n</font></i></b><p><fontcolor="#008080" face="AvantGarde" size="2">Siemens Communication
Software,</font><br/><font color="#008080" face="AvantGarde" size="2">2nd floor, Shankara Narayana
Building-1,</font><br/><font color="#008080" face="AvantGarde" size="2">25/1 Mahatma Gandhi Road,</font><br /><font
color="#008080"face="AvantGarde" size="2">Bangalore - 560 001,</font><br /><font color="#008080" face="AvantGarde"
size="2">India.</font><br/><i><font color="#008080" face="AvantGarde" size="2">Phone:  Off</font><font color="#008080"
face="TimesNew Roman" size="2">  </font> <font color="#008080" face="AvantGarde" size="2">:</font> <font
color="#008080"face="Times New Roman" size="2">91-80-2</font><font color="#008080" face="AvantGarde" size="2">506 2400,
25594067 - 73 </font></i><br /><i>        <font color="#008080" face="AvantGarde" size="2">Extn : 6369</font></i><br
/><i><fontcolor="#008080" face="Times New Roman" size="2">               Fax   : 91-80-2506 2406</font></i><br
/><i><fontcolor="#008080" face="AvantGarde" size="2">           Resi</font><font color="#008080" face="Times New Roman"
size="2"></font><font color="#008080" face="AvantGarde" size="2">:</font> <font color="#008080" face="Times New Roman"
size="2">91-80-28436106</font></i><br/><i><font color="#008080" face="Times New Roman" size="2">           Mobile:
91-9844519798</font></i><br /><i><font color="#008080" face="Times New Roman" size="2">Email:  
Premnath.kn@siemens.com</font></i>

Re: {I} One Information required...

От
Q Beukes
Дата:
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.kn@siemens.com/
>