So, as you've seen your options are:
- turn off passwords entirely (pg_hba.conf)
- put passwords in preference file (.pgpass)
- put passwords in environment variable (PGPASSWORD)
p.
On Jan 12, 2009, at 1:31 AM, Mark Cave-Ayland wrote:
[email protected] wrote:
I'm using postgreSQL 8.2.5 for Windows (with postGIS) and MapServer
for Windows for development environment. They run on Windows XP.
I just reformatted the hard drive and re-installed everything
(postGIS, ms4w), etc. Then, my first step is reloading all the
development shapefiles (SHP) into postGIS database using
shp2pgsql.exe (to create the script) and psql.exe (to run the
script and load the data).
The psql.exe command doesn't specify password, and it is something
like this:
psql.exe -c -d mydatabase -h localhost -U myuser -f "D:\mapfiles
\scripts\myloadingscript.sql"
When I ran the command above, it prompts me for a password. No
wonder, because the script doesn't specify the password.
However, the script above did NOT prompt for a password before I
reformatted my hard drive. Thus, I have disabled postgreSQL
password in my previous setting.
Alas, I don't remember what should I do to disable password. I have
given public access to my spatial database, and the psql.exe still
prompts for a password.
I really don't remember what I did previously to my postgreSQL
(before reformatting). I can only remember that the data loading
script above never asked for password before I reformatted my hard
drive.
Anyone could please help? Many thanks,
-Kresh
Hi Kresh,
Search the PostgreSQL libpq documentation/Google for "pgpass". You
can use this file to store passwords when connecting from certain
clients to certain databases.
HTH,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
--
Paul Ramsey
OpenGeo - http://opengeo.org
PostGIS is Love.
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users