Thread: starting postgres on windows

starting postgres on windows

From
garry saddington
Date:
How would I start Postgres on windows as an un-privileged user without
logging into an un-privileged account. I have tried the -U switch but it
still complains. I have version 8.
kind regards
Garry


Re: starting postgres on windows

From
"Harald Armin Massa"
Date:
Garry,

the standard recommendation is to install PostgreSQL as a service on windows; logging in with an own low privilege user account, usually named "postgres".

That usage of a service is recommended because it solves all the usual problems of services :) (start, shut down, login as seperate user ....)

However: I guess you have an privileged user (=Member of Administrators), and want to start PostgreSQL as an unprivileged user. So just create a command shell as that user:

runas /user:postgres cmd

and start and stop PostgreSQL within that shell. (in the long run, you can change that line to immediately start PostgreSQL instead of going via cmd)

For 8.2 there is scheduled a "drop privilege" method of startup on windows, so that starting PostgreSQL as Administrator is no longer a problem, since PostgreSQL will drop it privileges immediately after start.


hth

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.

Re: starting postgres on windows

From
"Raymond O'Donnell"
Date:
On 27 Nov 2006 at 8:03, garry saddington wrote:

> How would I start Postgres on windows as an un-privileged user without
> logging into an un-privileged account. I have tried the -U switch but
> it still complains. I have version 8.

If you installed PostgreSQL using the installer - which I'd
recommend, as it makes life *very* easy - then along the way it
should have created an unprivileged user. Have a look at the server
service in Administrative Tools -> Services, and on the "Log on" tab
you should see the user under which it's running.

--Ray.


----------------------------------------------------------------------

Raymond O'Donnell
Director of Music, Galway Cathedral, Galway, Ireland
rod@iol.ie
----------------------------------------------------------------------