[GRASSLIST:4230] Re: DBMI-Postgres driver error
Martin Wegmann
wegmann at biozentrum.uni-wuerzburg.de
Mon Aug 23 11:46:56 EDT 2004
On Monday 23 August 2004 16:23, Radim Blazek wrote:
> And 'psql -h localhost grass_test'?
> Maybe you need to edit pg_hba.conf.
psql -h localhost grass_test
psql: FATAL: IDENT authentication failed for user "baliola"
the non # part of pg_hba.conf looks like:
#
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
# Database administrative login by UNIX sockets
local all postgres ident
sameuser
#
# All other connections by UNIX sockets
local all all ident
sameuser
#
# All IPv4 connections from localhost
host all all 127.0.0.1 255.255.255.255 ident
sameuser
#
# All IPv6 localhost connections
host all all ::1
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ident sameuser
host all all ::ffff:127.0.0.1/128 ident
sameuser
#
# reject all other connection attempts
host all all 0.0.0.0 0.0.0.0 reject
I assume I have to change the 3. and 4. connection (localhost) from ident to
trust .
Martin
>
> Radim
>
> On Monday 23 August 2004 13:54, Martin Wegmann wrote:
> > hello Radim,
> >
> > On Monday 23 August 2004 12:43, Radim Blazek wrote:
> > > GRASS cannot store passwords, if your DB requires a password
> > > add it to the database parameter. Try psql first.
> >
> > The user is set up as a non-passwd user ('with password' is not used)
> > I can enter psql grass_test without being prompted for a password.
> >
> > baliola at diomedea:~$ psql grass_test
> > Welcome to psql 7.4.3, the PostgreSQL interactive terminal.
> >
> > Type: \copyright for distribution terms
> > \h for help with SQL commands
> > \? for help on internal slash commands
> > \g or terminate with semicolon to execute query
> > \q to quit
> >
> > grass_test=#
> >
> > drop user baliola and created a new user with specifying a passwd:
> > create user baliola with password 'test';
> > however psql is not prompting for as passwd when entering the grass_test
> > db.
> >
> > exit postgres and superuser -- starting grass57 as baliola
> >
> > db.connect driver=pg
> > database="host=localhost,dbname=grass_test,user=baliola,password=test"
> > driver:pg
> > database:host=localhost,dbname=grass_test,user=baliola,password=test
> >
> > db.tables -p
> > DBMI-Postgres driver error:
> > Cannot connect to Postgres: FATAL: IDENT authentication failed for user
> > "baliola"
> >
> > I did it as well with ' around the password phrase -- same result.
> >
> > Martin
> >
> > > Radim
> > >
> > > On Monday 23 August 2004 11:55, Martin Wegmann wrote:
> > > > hello,
> > > >
> > > > I did my first steps with postgresql and grass and ran into some
> > > > problems: First I created an user and set up a db ("grass_test")
> > > >
> > > > starting grass (5.7.0):
> > > > db.connect driver=pg
> > > > database="host=localhost,dbname=grass_test,user=baliola"
> > > >
> > > > I am not sure if "host=localhost" is correct. In all documents I read
> > > > so far, an IP address was specified but using 127.0.0.1 resulted in
> > > > the same error prompt. What do I enter when postgresql is running
> > > > locally?
> > > >
> > > > If I proceed and do 'db.test grass_test' then db.test tells me that
> > > > the db must exist.
> > > > If I do db.test test1 I get:
> > > >
> > > > DBMI-Postgres driver error:
> > > > cannot get user/password
> > > >
> > > > and various Postgresql commands
> > > >
> > > > Any idea how to solve that?
> > > >
> > > > I am still searching for a tutorial introducing people to the
> > > > postgresql inside GRASS usage, so far I found
> > > > http://mpa.itc.it/markus/shortcourse/notes6.html and
> > > > the GRASS 5.7 usage example document. any links are welcome.
> > > >
> > > > regards, Martin
More information about the grass-user
mailing list