Re: set passwd for users

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: set passwd for users
Date: 2003-04-28 20:50:43
Message-ID: Pine.LNX.4.33.0304281448310.13935-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan 2003-04-28 21:10:47 Re: encrypt/decrypt problem
Previous Message Mark Tessier 2003-04-28 20:45:54 Bad timestamp external representation