Received: from fmol.5sigcmd.army.mil (fmol.5sigcmd.army.mil [147.40.43.21]) by hub.org (8.10.1/8.10.1) with ESMTP id e6DE8q006804 for ; Thu, 13 Jul 2000 10:08:53 -0400 (EDT) Received: from localhost.localdomain (b817-dhcp43-228.5sigcmd.army.mil [147.40.43.228]) by fmol.5sigcmd.army.mil (8.9.3/8.9.3) with ESMTP id QAA15441 for ; Thu, 13 Jul 2000 16:09:36 +0200 Received: from pobox.com (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id QAA02470 for ; Thu, 13 Jul 2000 16:06:52 +0200 Message-ID: <396DCCFA.6C2E13A1@pobox.com> Date: Thu, 13 Jul 2000 16:06:50 +0200 From: "Anthony E. Greene" Organization: Americal Division Veterans Association X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: users and passwords problem References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/54 Denis Pugnere wrote: > > PG 7.0.2, RH Linux 6.2 > > I'm trying to secure access to pgsql databases. > the politic I use is to only allow access databases with passwords. > > for this, I use in pg_hba.conf : > local all password > host all 127.0.0.1 255.255.255.255 password > > I don't understand why with this configuration I can access to all > databases even if I'm not the owner, for example : If the database test is > owned by user1 and this user has all grants on all tables in this > database, every user created with "CREATE USER ..." (with or without > password) in the local system can run a command like : > > user2% psql test -U user1 > Welcome to psql, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help on internal slash commands > \g or terminate with semicolon to execute query > \q to quit > > test=> > > Why this access is allowed ? > How to secure accesses to databases ? Have that "unauthorized" user try a SELECT and see what happens. They are allowed to connect, but not to retrieve any records. -- Anthony E. Greene PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D Linux. The choice of a GNU Generation.