sysusers , systabauth, syscolauth
Posted in 2016
Topics: Stored Procedures & SPL, Security, Permissions & Auditing
Anybody tried inserting into sysusers, systabauth and syscolauth? They haver really weird privileges in a database and they don't want to define 50+ role types. They want to create one user exacly as another user. It would be really easy if I just could insert in those tables insert of decoding tabauth, colauth. Or perhaps someone has already the function/spl to do the clone with grants?
Jacabo:
My dbschema replacement utility, myschema, has an option (-g filename) to
generate the privileges to a separate file. Once you have that you can
easily write an awk or perl script to filter out the privilege lines for a
single appropriate user and replace the usernames. There are sample awk
scripts for similar things in my utils4_ak package. Myschema is in the
utils2_ak package. You can download the latest utils4_ak from the IIUG
Software Repository and the latest utils2_ak from my web site (
www.askdbmgt.com/my-utilities) the one on te IIUG site is a few releases
behind.
Having said all that and covered your direct request, I would strongly
recommend that you encourage your stakeholders to embrace roles instead. I
have had two clients who had literally several hundreds of thousands or
systabauth and syscolauth records in their database (one was approaching 1
million rows) and resisted converting to roles for the longest time. Once
we finally convinced them to switch literally every single query they run
executed significantly faster! This because we were able to whittle them
down to about 10,000 rows in each privilege catalog table. Saved one
client from having to upgrade to faster more expensive hardware prematurely.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Mon, Feb 22, 2016 at 6:10 AM, JACOBO BALBUENA <jacobo.bc@gmail.com>
wrote:
> Anybody tried inserting into sysusers, systabauth and syscolauth?
>
> They haver really weird privileges in a database and they don't want to
> define
> 50+ role types. They want to create one user exacly as another user. It
> would
> be really easy if I just could insert in those tables insert of decoding
> tabauth, colauth.
>
> Or perhaps someone has already the function/spl to do the clone with
> grants?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a113eb32454d0c0052c5a85af
Hello. AGS Server Studio has that feature included. Remember: it is not recommended to manipulate sys objects. It is not so difficult to write a program for generating the grant clauses, according to systabauth table. It will be harder, of course, if you use column based authentication (syscolauth), but nothing like a "seven head monster". Hope it helps. Regards. Alexandre Marini > To: ids@iiug.org > From: jacobo.bc@gmail.com > Subject: sysusers , systabauth, syscolauth [36596] > Date: Mon, 22 Feb 2016 06:10:21 -0500 > > Anybody tried inserting into sysusers, systabauth and syscolauth? > > They haver really weird privileges in a database and they don't want to define > 50+ role types. They want to create one user exacly as another user. It would > be really easy if I just could insert in those tables insert of decoding > tabauth, colauth. > > Or perhaps someone has already the function/spl to do the clone with grants? > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >