[GRASSLIST:4044] Re: Postgres and g.select.db problem.

Christoph Simon ciccio at kiosknet.com.br
Sat Jul 6 08:23:44 EDT 2002


On Sat, 6 Jul 2002 12:32:15 +0100
Glynn Clements <glynn.clements at virgin.net> wrote:

> 
> Ben Logan wrote:
> 
> > $ g.select.pg database=virginia
> > Error: select Postgres:fe_sendauth: no password supplied
> > 
> > psql doesn't require a password, so I don't understand what's going on
> > here.  I also get this message with the 'grass' database, which I also
> > have access to without a password (from psql and the python Postgres
> > library).  Any idears?
> 
> g.select.pg connects to the "template1" database (this is hardcoded),
> then executes "select datname from pg_database", and checks that the
> selected database is included in the output. Does your "template1"
> database require a password?
> 
> I have no idea why it doesn't just connect to the selected database.

Just a blind try: Might it be possible that you are connecting with
psql via local Unix sockets, while having setup an inet connection
from withing Grass, for instance specifying a hostname? Maybe, your
postgres isn't configured to listen on any tcp port at all; I think
this would be the default on a debian system. You might also want to
check the settings in pg_hba.conf. This file can allow connections on
127.0.0.1 but deny (or require password authentication) those in your
local address (e.g., 192.168.x.x).

Another idea: psql can use several environment variables. Grass
doesn't add it's own variables, but creates a completely new
environment. Can you connect with psql from your Grass prompt?

-- 
Christoph Simon
ciccio at kiosknet.com.br
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
.



More information about the grass-user mailing list