Re: set passwd for users - Mailing list pgsql-general

From scott.marlowe
Subject Re: set passwd for users
Date
Msg-id Pine.LNX.4.33.0304281448310.13935-100000@css120.ihs.com
Whole thread Raw
In response to set passwd for users  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
On Mon, 28 Apr 2003, Johnson, Shaunn wrote:

>
> Howdy:
>
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> Is it possible to have a password set for users for
> command line use?
>
> For example, I have scripts where I create and maintain
> some aspects of the database.  Let's say that a user
> doesn't like the permission that I set for the table and wants
> to change it themselves.  They could do something like this:
>
>
> testdb> \c database newuser
>
> and are now the new user 'newuser'.  How can I set
> this up to work via the command line as well as with
> some ODBC connection?
>
> I am looking in the pg_hba.conf file and I see where
> it talks about the system, permissions and such,
> but I am more curious as to how to set my file
> up so that maybe only the postgreSQL user can have
> root-like accesses.

Yes, you can do this.  The file that controls this behavior is the one
located in $PGDATA called pg_hba.conf.  It, by default, is set to let
local unix socket connections occur with "trust" which means that if you
say you're Kim Jong Il, you must be.

If you change that setting to something else, then you'll have to always
procide your password when connecting.

I think you have to do a complete shutdown/startup cycle on postgresql for
this to take effect.


pgsql-general by date:

Previous
From: Mark Tessier
Date:
Subject: Bad timestamp external representation
Next
From: "Ivan"
Date:
Subject: Re: encrypt/decrypt problem