[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] Problems calling or obtaining passwords from .pgpass
From: |
Busser, Jim |
Subject: |
[Gnumed-devel] Problems calling or obtaining passwords from .pgpass |
Date: |
Thu, 21 Nov 2013 22:28:08 +0000 |
Hi,
I am still working on seeing if I can bootstrap on Mac making as few changes as
absolutely necessary to the bootstrap files.
This time, I put in place a
.pgpass
file of the form below, and I did not bother to uncomment the various
name = postgres
#password
and the upgrade script was able to execute the initial portion of the
bootstrap, which depended on yet did not prompt me for the pw for gm-dbo
1) creating backup of existing database …
Note that this may take a substantial amount of time and disk space!
You may need to type in the password for gm-dbo.
However, after it next got to
Do you really want to install this database setup ?
Type yes or no:
it failed (see log). It got me to observe that in
fixup_db-v19.conf
the behaviour above would seem to follow from lines 75-82
#----------------------------------
[user GNUmed owner]
name = gm-dbo
password =
[user postgres]
name = postgres
#password =
where the #password seems it may need to be uncommented.
I only do not know why it should work for other people.
Maybe others employ an alternative method involving the postgres password being
requested (and supplied) upstream, such that user name 'postgres' remains
considered authenticated for the remainder of the session on the basis of an
upstream command?
Should I modify line 8 of the vaarious conf files
interactive = yes
to 'no'?
Following between ==== is the .pgpass file which I created in my regular user
account at ~/.pgpass and which I tested successfully with
psql -d postgres -U postgres -w
(which did not ask me for a password) before I then copied this file into
root's home directory
/var/root
============================================================
# ~/.pgpass (default location for a PostgreSQL .pgpass file)
# superceded by location specifiable by environment variable PGPASSFILE
# example: set PGPASSFILE=C:\Program Files\someapp\pgpass.conf
# file permissions must disallow access to world or group
# should be -rw------- as achievable by chmod 0600 ~/.pgpass
# bypassed (not read) if the environment variable PGPASSWORD is set
# format is hostname:port:database:username:password
# first four fields may contain * wildcard
# password, apart securely-isolated machines, should be other than username
*:*:*:gm-dbo:gm-dboPW
*:*:*:postgres:pgPW
============================================================
-- Jim
update_db-v18_v19.log
Description: update_db-v18_v19.log
- [Gnumed-devel] Problems calling or obtaining passwords from .pgpass,
Busser, Jim <=