From: R D <mrk279@yahoo.com>
To: Kevin Schachter <kevin@kevinity.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Granting Permissions to User To Access Database
Date: Mon, 8 Jan 2001 01:31:55 -0800 (PST)
Message-ID: <20010108093155.60198.qmail@web10008.mail.yahoo.com> (raw)
--- Kevin Schachter <kevin@kevinity.com> wrote:
> I recently installed Postgres on my server to rid of
> the horrible
> limitations of Mysql. However I am having some
> trouble setting up
> permissions as they are in MySQL.
>
> In MySQL you can grant a user select permissions to
> all tables in a database
> with the command "GRANT select on db.* to .....". Is
> there a similar way to
> accomplish this in Postgres? Reading up on GRANT I
> see that it only works
> for individual tables and not a full database.
>
> As well, how can I restrict a user to only one
> database. In pg_hba.conf
> there is nothing that specifies the user name. I can
> grant access to the
> database to all users on an ip, but I can't grant it
> to only one user.
>
> Thanks in advance,
>
> Kevin
>
You can do this by using external password file. Edit
pg_hba.conf
host database x.x.x.x y.y.y.y password passwdfile
where database is database name, x.x.x.x and y.y.y.y
are ip and netmask and passwdfile is the name of the
file with passwords for the allowed users.
Read the documents for more info!
This is one of the features of PgSQL that I do not
like. It is much nicer to type:
"grant all on database.table to ....."
And I asked the developers to do that but they did not
take it very seriously.
There is one thing I do not like: you can not disallow
users to create tables. Every user having access to a
database can create a table in it. This was in the
todo list of 7.1 but now it is removed. Stupid...
But....
Anyway Postgres is an excellent database!
Rumen
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mrk279@yahoo.com, kevin@kevinity.com
Subject: Re: Granting Permissions to User To Access Database
In-Reply-To: <20010108093155.60198.qmail@web10008.mail.yahoo.com>
References: <20010108093155.60198.qmail@web10008.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox