473,395 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Check for SyAuth

I am wondering how to check for authorizations. I see DbAbmAuth in
SysCat.DbAuth to check for DbAbm priviliges. Is there a similar way to
check for SysAdm priviliges?

Also, SysCat.TabAuth has a GranteeType which can be a user or a group.
The user is stored in the the USER special register. How do i find out
what a user's group is?

B.

Dec 6 '06 #1
7 1483

Brian Tkatch wrote:
[...]
Also, SysCat.TabAuth has a GranteeType which can be a user or a group.
The user is stored in the the USER special register. How do i find out
what a user's group is?
Dont know how to do it in the catalog, but if you are allowed to read
/etc/group you can look it up there.

/Lennart

Dec 6 '06 #2
Brian Tkatch wrote:
I am wondering how to check for authorizations. I see DbAbmAuth in
SysCat.DbAuth to check for DbAbm priviliges. Is there a similar way to
check for SysAdm priviliges?

Also, SysCat.TabAuth has a GranteeType which can be a user or a group.
The user is stored in the the USER special register. How do i find out
what a user's group is?
Groups are managed by the security plugin that you are using. If you
haven't installed one yourself, the default is to rely on the underlying OS
for user and group management. That's where you will have to lookup which
groups (plural!) a user belongs to.

You could also write a simple table function (UDF) that extracts the group
information for a given user from whereever you store that information.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Dec 7 '06 #3

Knut Stolze wrote:
Brian Tkatch wrote:
I am wondering how to check for authorizations. I see DbAbmAuth in
SysCat.DbAuth to check for DbAbm priviliges. Is there a similar way to
check for SysAdm priviliges?

Also, SysCat.TabAuth has a GranteeType which can be a user or a group.
The user is stored in the the USER special register. How do i find out
what a user's group is?

Groups are managed by the security plugin that you are using. If you
haven't installed one yourself, the default is to rely on the underlying OS
for user and group management. That's where you will have to lookup which
groups (plural!) a user belongs to.
Yep. That's how its setup. We're using the underlying OS.
You could also write a simple table function (UDF) that extracts the group
information for a given user from whereever you store that information.
But that would not be standardized. I was hoping to find an "official"
way to do this.

Anyway, rhanx for the reply, Knut! I was just writing a script and
wanted to cover all the bases if i could (good habit to get into). But,
this does not seem important enough to me, given the way we have rights
set up (because AFAIK, we do not use groups).

Is SysAdm just root then?

B.

Dec 7 '06 #4
Brian Tkatch wrote:
Is SysAdm just root then?
No, and it should never be set so. If you have not changed it, it is the
primary group of the DB2 instance owner at time of instance creation. Have
a look at the SYSADM_GROUP parameter of your instance dbm cfg.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 7 '06 #5
Knut Stolze wrote:
Brian Tkatch wrote:
Is SysAdm just root then?

No, and it should never be set so. If you have not changed it, it is the
primary group of the DB2 instance owner at time of instance creation. Have
a look at the SYSADM_GROUP parameter of your instance dbm cfg.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
I am not the DBA, so i didn't set anything. Is there a way any user
(with CONNECT) can check this from within SQL itself?

Again, this isn't that important. I'd just like to know how to do it,
and have it in the script just for completelness.

B.

Dec 7 '06 #6
Brian Tkatch wrote:
I am not the DBA, so i didn't set anything. Is there a way any user
(with CONNECT) can check this from within SQL itself?
You can use the function GET_DBM_CONFIG.

SELECT sysadm_group
FROM TABLE ( get_dbm_config() ) AS n
WHERE dbmconfig_type = 1

p.s: You need to be on V8.2.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 8 '06 #7
Knut Stolze wrote:
Brian Tkatch wrote:
I am not the DBA, so i didn't set anything. Is there a way any user
(with CONNECT) can check this from within SQL itself?

You can use the function GET_DBM_CONFIG.

SELECT sysadm_group
FROM TABLE ( get_dbm_config() ) AS n
WHERE dbmconfig_type = 1

p.s: You need to be on V8.2.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Unfortunately, we're not on 8.2 (yet, i hope). We're on 8.1.6.

Regardless, thanx. That's what i wanted to see.

B.

Dec 8 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Craig Bailey | last post by:
Someone please explain what alternate universe I fell into this afternoon when PHP started telling me that 2 doesn't equal 2. Not sure about you, but when I run this, it tells me 59001.31 doesn't...
13
by: Adrian Parker | last post by:
I have a PHP generated page which displays X many records. Each record has a checkbox preceding it. The user checks several checkboxes, and hits a delete button. All the corresponding records...
7
by: Tony Johnson | last post by:
Can you make a check box very big? It seems like when you drag it bigger the little check is still the same size. Thank you, *** Sent via Developersdex http://www.developersdex.com ***...
2
by: Travis.Box | last post by:
I have an MS Access userform with 16 Check Boxes. Each of the checkboxes has a different option value, which coincides with the Check Box name (eg. cb01.OptionValue = 1). At the bottom of the...
1
by: scprosportsman | last post by:
Please help guys, i am trying to set up a database here at work and im fairly new to access in terms of writing functions and queries and stuff. I have 2 different places on my design that will...
2
by: Chris Davoli | last post by:
How do you enable a check box in the GridView. I selected Checkbox Field in the Columns of the GridView, and the check box shows up in the Grid view, but it is disabled. How do I enable it so I can...
16
by: Brian Tkatch | last post by:
Is there a way to check the order in which SET INTEGRITY needs to be applied? This would be for a script with a dynamic list of TABLEs. B.
5
by: starke1120 | last post by:
Im creating a check in – check out database for RF guns. I have a table that contains models. ID (primary key) Model A table that contains Gun Details ID (primary key) Model_id...
1
by: ghjk | last post by:
my php page has 7 check boxes. I stored checked values to database and retrive as binary values. This is the result array Array ( => 0 => 1 => 0 => 1 => 0 => 0 => 1 ) 1 means checked....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.