Client Authentication

Started by Stefan Sturmabout 18 years ago4 messagesgeneral
Jump to latest
#1Stefan Sturm
stefan.s.sturm@googlemail.com

Hello,

I set up a PostgreSQL 8.3.1 Server on my Webserver( located somewhere in the
web ).
On my local Server I use the trust method to access the server. But on my
Webserver I want to use an user with password to access the Server.
So I did the following:

I created a user( as superuser ) with:
createuser -P username

Then I add a new line to the pg_hba.conf file:
host all username 0.0.0.0 md5

I want to access all databases from all IP-Adresses with this user.

But this fails :-(

WHere is my Error? I hope some can help me.

Thanks and greetings,
Stefan Sturm

#2A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Stefan Sturm (#1)
Re: Client Authentication

am Fri, dem 18.04.2008, um 8:41:17 +0200 mailte Stefan Sturm folgendes:

Hello,

I set up a PostgreSQL 8.3.1 Server on my Webserver( located somewhere in the
web ).
On my local Server I use the trust method to access the server. But on my
Webserver I want to use an user with password to access the Server.
So I did the following:

I created a user( as superuser ) with:
createuser -P username

Then I add a new line to the pg_hba.conf file:
host all username 0.0.0.0 md5

~~~~~~~

This should be an CIDR, but it's only a IP.

I want to access all databases from all IP-Adresses with this user.

But this fails :-(

WHere is my Error? I hope some can help me.

Where ist the error-message?

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

#3Klint Gore
kgore4@une.edu.au
In reply to: Stefan Sturm (#1)
Re: Client Authentication

Stefan Sturm wrote:

Hello,

I set up a PostgreSQL 8.3.1 Server on my Webserver( located somewhere
in the web ).
On my local Server I use the trust method to access the server. But on
my Webserver I want to use an user with password to access the Server.
So I did the following:

I created a user( as superuser ) with:
createuser -P username

Then I add a new line to the pg_hba.conf file:
host all username 0.0.0.0
<http://0.0.0.0&gt; md5

I want to access all databases from all IP-Adresses with this user.

But this fails :-(

WHere is my Error? I hope some can help me.

try adding a subnet mask
host all username 0.0.0.0 0.0.0.0 md5
or a cidr mask
host all username 0.0.0.0/0 md5

klint.

--
Klint Gore
Database Manager
Sheep CRC
A.G.B.U.
University of New England
Armidale NSW 2350

Ph: 02 6773 3789
Fax: 02 6773 3266
EMail: kgore4@une.edu.au

#4Stefan Sturm
stefan.s.sturm@googlemail.com
In reply to: Klint Gore (#3)
Re: Client Authentication

Hello,

try adding a subnet mask
host all username 0.0.0.0 0.0.0.0 md5
or a cidr mask
host all username 0.0.0.0/0 md5

that's it. I don't know, why I only wrote 0.0.0.0...
Thats cleary my fault.

Thanks for all your help.

Greetings,
Urkman