Re: Permissions in Tables
Posted in 2003
Topics: Server Administration
For single DB, Try out this simple script-
------------------------------------------------
#!/bin/sh
dbaccess <database_name> <<eof
select a.grantor, a.grantee, b.tabname, a.tabauth
from systabauth a, systables b
where a.tabid = b.tabid
and a.tabid > 99 and a.grantee = "public"eof
-------------------------------------------------
Hari
"Dave Mendez" <dhmendez@mail.cinvestav.mx> wrote in message
news:3ED6EA0A.42CB1B02@mail.cinvestav.mx...
> Is there any script to check the permissions of databases and tables,
> instead of makeing a query. I wanna see how many databases have public
> access, etc.
> Thanks in advances.
> Dave
>
Have you tried:
For database permissions:
dbschema -d dbname -p all | pg
For table permissions:
dbschema -d dbname -t tabname -p all | pg
Jason Harrington
In article <Q4DBa.360$Ve4.14704@news.optus.net.au>, Hari Gupta
<hariog@yahoo.com> writes
>For single DB, Try out this simple script-
>
>------------------------------------------------
>#!/bin/sh
>
>dbaccess <database_name> <<eof
>select a.grantor, a.grantee, b.tabname, a.tabauth
>from systabauth a, systables b
>where a.tabid = b.tabid
>and a.tabid > 99 and a.grantee = "public">eof
>-------------------------------------------------
>
>Hari
>
>"Dave Mendez" <dhmendez@mail.cinvestav.mx> wrote in message
>news:3ED6EA0A.42CB1B02@mail.cinvestav.mx...
>> Is there any script to check the permissions of databases and tables,
>> instead of makeing a query. I wanna see how many databases have public
>> access, etc.
>> Thanks in advances.
>> Dave
>>
>
>
--
Jason Harrington