Creating DB with pass, but pass not required to connect

From: "Pablo Gosse" <gossep(at)unbc(dot)ca>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Creating DB with pass, but pass not required to connect
Date: 2004-11-09 19:59:48
Message-ID: 8FD9D015D273DA4BB2B7B220C4D7B26902942A@pg-adr-exch-01.adr.unbc.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi folks. I'm creating a database using the following command:

createdb -U pablo -W pablotest1

I'm prompted to enter the password to create the DB, and after doing so
the db is created successfully.

However, when I connect to this database via a php script, I can enter
any valid database user, and I can enter anything for the password (or
leave it blank), and I'm still able to connect.

So, each of these connection calls works:

$conn->Connect('localhost','pablo','realpass','pablotest1');
$conn->Connect('localhost','pablo','','pablotest1');
$conn->Connect('localhost','pablo','abc123','pablotest1');
$conn->Connect('localhost','bsc','notapass','pablotest1');
$conn->Connect('localhost','bsc','','pablotest1');

Obviously I'm doing something wrong here, since I don't want scripts to
be able to connect without the proper credentials.

Can anyone give me an idea if I'm executing the createdb command
incorrectly, or if something on the server level might be causing this?

Cheers and TIA,

Pablo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Hatcher 2004-11-09 20:03:12 Re: Vacuum hangs
Previous Message Woodchuck Bill 2004-11-09 19:45:59 Re: Important Info on comp.databases.postgresql.general