[GRASSLIST:3475] authentication type

hello,

when i did some exercises to get data from my postgresql database i had the
following line in my pg_hba.conf

host all postgres IP IP trust

this was only for test-purposes on my local machine. the next step would be to
change 'trust', as this is not a clever solution. but 'trust' seems to be the
only authentication type working as i got this message:

DBMI-Postgres driver error:
cannot get user/password

GRASS 5.7.-cvs:~/diss/grassdata > v.in.db driver=pg \
  database="host=IP,dbname=test,user=postgres" table=station x="x(location)" \
  y="y(location)" z="z(location)" key=station_id output=meteostatio
WARNING: Cannot open database 'host=IP,dbname=test,user=postgres'
ERROR: Cannot open database $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ by driver
       dbf

from the tutorial i got the following message:
#create new PostgreSQL user (warning, we don't use a passowrd here!)

but who can work with this recommendation?

does anyone have an advice?

thanks a lot, sabine

Hello Sabine,

On Mon, 24 May 2004 16:00:30 +0200 Sabine Grabner <csab7771@uibk.ac.at>
wrote:

hello,

when i did some exercises to get data from my postgresql database i
had the following line in my pg_hba.conf

host all postgres IP IP trust

this was only for test-purposes on my local machine. the next step
would be to change 'trust', as this is not a clever solution. but
'trust' seems to be the only authentication type working as i got this
message:

DBMI-Postgres driver error:
cannot get user/password

GRASS 5.7.-cvs:~/diss/grassdata > v.in.db driver=pg \
  database="host=IP,dbname=test,user=postgres" table=station
  x="x(location)" \ y="y(location)" z="z(location)" key=station_id
  output=meteostatio

[...]

does anyone have an advice?

AFAIK Postgres needs a valid password set in order to work with anything
else than trust. If there is no password set for the user in question,
no login will be successful.

Alter the user-table and add a passwd and retry, perhaps first with
psql, the command-line-client.

hth
  Stephan Holl

--
Stephan Holl

Check headers for GnuPG Key!
http://www.gdf-hannover.de