From: | "Sean W(dot) Ellis" <sean(dot)ellis(at)oscenter(dot)com> |
---|---|
To: | PostgreSQL Question <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Re: [GENERAL] Remote Authentication |
Date: | 1999-09-07 13:34:00 |
Message-ID: | 37D51448.7FA5C89@oscenter.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
wim wrote:
>
> Hi Sean,
>
> I'm approaching my database over the internet as well. I wondered what you
> use to connect to the database,
> are you using ODBC or is there a httpd server connecting to the database
> using some module like php?
> If the last one is the case, then the machine running the httpd server is
> accessing your database, not the clients on the internet.
> Depending on how you would like to access the database your
> /etc/rc.d/init.d/postgresql file must contain something like this. Read the
> manual page on the option -i
>
> su postgres -c '/usr/bin/postmaster -i -S -D/var/lib/pgsql'
>
> the pg_hba.conf should contain something like this:
>
> local dbname password
> ./data/sqlpasswd
> host all 0.0.0.0 0.0.0.0 password
> ./data/sqlpasswd'
I am running postgres as user www. postmaster -i -S -D
/usr/local/pgsql/data
In my init I have: su www -c '/usr/local/pgsql/bin/postmaster -i -S -D
/usr/local/pgsql/data'
Everything works fine with my webserver connecting via perl. Everything
is fine for me connecting remotely using psql -h apollo if I have trust
access on. But, it all goes to pot when I do this in my pg_hba.conf:
host all 192.168.0.0 255.255.0.0 password sqlpasswd
I have even tried full path and ./data/sqlpasswd, by your suggestion
above. My env vars are:
PGLIB=/usr/local/pgsql/lib
PGDATA=/usr/local/pgsql/data
My sqlpasswd file is:
apollo:~/sql/data$ cat sqlpasswd
root:passwd:10794:0:::::
bits:passwd:10796:0:99999:7:::
asns:dfljskdflsjdf:10816:0:99999:7:::
ednabuil:sdfsdfs:10812:0:99999:7:::
asns2:sdfsdf:10816:0:99999:7:::
frayhall:sdfsdfs:10819:0:99999:7:::
www:sdfsdfsdf:10836:0:99999:7:::
pg_passwd will allow me to change the passwords in the this file, so it
is readable to postgres, but when I try remote connect I get:
bits:~$ psql -a password -h apollo -u
Username: www
Password:
Connection to database 'www' failed.
User authentication failed
Same when I exchange crypt for password. Anything else you might know
of?
From | Date | Subject | |
---|---|---|---|
Next Message | Bryan Fullerton | 1999-09-07 15:23:03 | Solaris 7 settings |
Previous Message | Herouth Maoz | 1999-09-07 12:51:00 | Re: [GENERAL] Is there a psqlODBC for the Mac? |