[postgis-users] How to disable password in postgreSQL (pardon the stupid question)
pramsey at opengeo.org
Mon Jan 12 09:08:25 PST 2009
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)
On Jan 12, 2009, at 1:31 AM, Mark Cave-Ayland wrote:
> kreshna_iceheart at yahoo.com 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
>> 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
>> Anyone could please help? Many thanks,
> 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.
> Mark Cave-Ayland
> Sirius Corporation - The Open Source Experts
> T: +44 870 608 0063
> postgis-users mailing list
> postgis-users at postgis.refractions.net
OpenGeo - http://opengeo.org
PostGIS is Love.
More information about the postgis-users