Received: from druid.net (root@druid.net [198.96.119.226]) by hub.org (8.8.8/8.7.5) with SMTP id XAA00980 for ; Thu, 10 Sep 1998 23:11:32 -0400 (EDT) Received: from localhost (1498 bytes) by druid.net via sendmail with P:stdio/R:inet_hosts/T:smtp (sender: ) (ident using unix) id for ; Thu, 10 Sep 1998 23:11:15 -0400 (EDT) (Smail-3.2.0.101 1997-Dec-17 #1 built 1998-Jul-20) Message-Id: From: darcy@druid.net (D'Arcy J.M. Cain) Subject: Re: [SQL] connecting with password To: ericm@palaver.net (Eric McKeown) Date: Thu, 10 Sep 1998 23:11:15 -0400 (EDT) Cc: pgsql-sql@postgreSQL.org (PGsql) In-Reply-To: from "Eric McKeown" at Sep 10, 1998 09:18:40 PM X-Mailer: ELM [version 2.5 PL0b1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thus spake Eric McKeown > Is there any way to set up special password protections for a Postgres > database, so that I can force someone to present a username and password > when connecting from a PHP script? I've combed the docs for something on > this, and I may just be completely off base on the feasibility. What I do is run the page as the database owner (I run a separate Apache on a different port) and use the Apacher server password protections. Just remember to check who the remote user is every time you do any operation where the specific user is important. If you just need to make a general restriction on a database for a group then the protection in the config files (or .htaccess) should be fine. How you do this in PHP is up to you. I do it all in Python. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.