X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BDF43D1B50D for ; Wed, 15 Oct 2003 14:41:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 64538-06 for ; Wed, 15 Oct 2003 11:40:43 -0300 (ADT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id 69103D1B537 for ; Wed, 15 Oct 2003 11:40:38 -0300 (ADT) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1A9mpN-000HZn-0W; Wed, 15 Oct 2003 15:40:42 +0100 Received: from linda.lfix.co.uk ([192.168.1.1]) by cerberus.lfix.co.uk with esmtp (Exim 4.22) id 1A9mp2-0000u3-Hl; Wed, 15 Oct 2003 15:40:20 +0100 Subject: Re: working with users From: Oliver Elphick To: Sam Carleton Cc: pgsql-admin@postgresql.org In-Reply-To: <20031015011052.GA8143@miltonstreet.com> References: <20031015011052.GA8143@miltonstreet.com> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1066228820.24290.275.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 15 Oct 2003 15:40:20 +0100 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/154 X-Sequence-Number: 10715 On Wed, 2003-10-15 at 02:10, Sam Carleton wrote: > Ok, I am a newbie, but I simply cannot find anything in the > documentation so I hope you all are kind to me... Read through the Administrator's Manual - client authentication section. > I have installed Postgres 7.3.4 (will reinstall once I get OpenSLL > compiled into it). I created the postgres user, and the first > database. As the postgress user, I am able to run psql and access > the database that I created. I have been able to run the create > user command. > > But how do I see what users exist for the database? SELECT * FROM pg_user; Users exist for the whole database cluster, not just one database. However you can use client authentication (see below) to limit access to particular databases. > Because I was > the user postgres when I created the database, does that mean there > was a postgres user added during creation? Yes (unless you specified differently on initdb's command line.) > If not, what user am I > when I run psql as postgres? If I am postgres, what is the password > to the database and how do I rest it? User authentication is controlled by the file $PGDATA/pg_hba.conf By default, access is allowed without any check or password to anyone connecting through the Unix socket; users are trusted to tell the truth about who they are. You can set a password with ALTER USER but it won't be used until you change the authentication policy. > Now I am not a DBA, but I have been around enough databases to know > that most of them have their own system tables. Does postgres have > system tables? If so, where do I find a list of them and their > usage? They are in the documentation. In psql, the command \dS will list them. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "If ye love me, keep my commandments." John 14:15