Re: postgres user with password read-only user without?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ted Toth <txtoth(at)gmail(dot)com>, Psql_General <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgres user with password read-only user without?
Date: 2016-01-12 17:45:32
Message-ID: 56953BBC.7000106@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/12/2016 09:41 AM, Ted Toth wrote:
> Is there a way to configure authentication so that some users require
> a password and other users don't?

Yes, see:

http://www.postgresql.org/docs/9.4/interactive/auth-pg-hba-conf.html

"user

Specifies which database user name(s) this record matches. The
value all specifies that it matches all users. Otherwise, this is either
the name of a specific database user, or a group name preceded by +.
(Recall that there is no real distinction between users and groups in
PostgreSQL; a + mark really means "match any of the roles that are
directly or indirectly members of this role", while a name without a +
mark matches only that specific role.) For this purpose, a superuser is
only considered to be a member of a role if they are explicitly a member
of the role, directly or indirectly, and not just by virtue of being a
superuser. Multiple user names can be supplied by separating them with
commas. A separate file containing user names can be specified by
preceding the file name with @.
"

>
> Ted
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2016-01-12 17:47:40 Re: WIP: CoC
Previous Message David G. Johnston 2016-01-12 17:45:12 Re: postgres user with password read-only user without?