Обсуждение: Role Authority when running pgadmin3

Поиск
Список
Период
Сортировка

Role Authority when running pgadmin3

От
"Jerrold \"Eric\" Thompson"
Дата:
I am new to pgadmin3 and PostgreSQL.

I have set the system user 'jet' to be a superuser.

I have a database user 'videoworks', and a database videoworks.

When I start pgadmin3 from bash and logged in as 'jet', most of
the configuration tools are available to me on the videoworks
database, except Tools => Server Configuration.

At this point:    Login    Createdb    Inherits
...are set to yes
    Superuser    Create Roles    Update catalogs

are set to no
 ...........for user videoworks

User 'jet' is set to yes for everything.

If I set the database user 'videoworks' as a superuser,
then restart the server, and restart pgadmin3 I am able to
use Tool => System Configuration

My question is: I thought it was a bad Idea to grant Superuser status to all
roles, but without doing so how am I able to use the
    TOOL => System Configuration

when I start pgadmin3 and I am logged in to the shell as 'jet'?

Here is my pg_hba.conf at this point:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         postgres                        ident
local    all    jet    ident
# "local" is for Unix domain socket connections only
local   all         all                         md5
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

Thank you,
   Jet






Re: Role Authority when running pgadmin3

От
Guillaume Lelarge
Дата:
On Sun, 2012-01-08 at 12:37 -0800, Jerrold "Eric" Thompson wrote:
> I am new to pgadmin3 and PostgreSQL.
> 
> I have set the system user 'jet' to be a superuser.
> 
> I have a database user 'videoworks', and a database videoworks.
> 
> When I start pgadmin3 from bash and logged in as 'jet', most of
> the configuration tools are available to me on the videoworks
> database, except Tools => Server Configuration.
> 
> At this point:
>      Login
>      Createdb
>      Inherits
> ...are set to yes
> 
>      Superuser
>      Create Roles
>      Update catalogs
> 
> are set to no
> 
>   ...........for user videoworks
> 
> User 'jet' is set to yes for everything.
> 
> If I set the database user 'videoworks' as a superuser,
> then restart the server, and restart pgadmin3 I am able to
> use Tool => System Configuration
> 

You don't need to restart the server for this.

> My question is: I thought it was a bad Idea to grant Superuser status to all
> roles, but without doing so how am I able to use the
> 
>      TOOL => System Configuration
> 
> when I start pgadmin3 and I am logged in to the shell as 'jet'?
> 

It's actually a bad idea to grant superuser attribute to all roles. But
giving all your users the right to change the system configuration, and
restart the server is also a bad idea.

Anyway, we cannot allow everyone to change configuration as they see
fit, and restart the server, and whatnot. And, to be honest, pgAdmin is
pretty hard to use at its fullest without superuser attribute.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
PostgreSQL Sessions #3: http://www.postgresql-sessions.org