If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > granting access to another unix user

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-03-10, 21:08
shashankj shashankj is offline
Registered User
 
Join Date: Mar 2010
Posts: 13
granting access to another unix user

Hi,

I have installed DB2 v9.7 express on one Linux box as db2inst1 user. I have created a database TEST on it.
I want to grant permission (Full access - Admin) to another user on linux (system user say dummy). I have used command below which is successful but the unix user dummy is not able to modify anything in it. It looks like it does not have sufficient access.

db2 connect to TEST
db2 "GRANT DBADM WITH ACCESSCTRL ON DATABASE TO USER dummy"

How should I fix this issue? How can I grant complete write to user dummy?

To able to use 'db2' command from dummy user, I have sourced profile from db2inst1 user like below. Is this ok?
. ~db2inst1/sqllib/db2profile

Your help is much appreciated.

Thanks and Regards,
Shashank
Reply With Quote
  #2 (permalink)  
Old 08-03-10, 22:49
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
I assume you have a Linux user set up in the OS called dummy? You might try to add the user to the db2users group.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 08-03-10 at 23:12.
Reply With Quote
  #3 (permalink)  
Old 08-03-10, 23:38
wilsonfv wilsonfv is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
Database user is derived from OS users. You can add the OS user "dummy" to the "db2admin" group. But first, make sure you have created a user "dummy" in OS level.
Reply With Quote
  #4 (permalink)  
Old 08-04-10, 00:34
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by wilsonfv View Post
Database user is derived from OS users. You can add the OS user "dummy" to the "db2admin" group. But first, make sure you have created a user "dummy" in OS level.
I believe that the db2admin group applies to DB2 for Windows on a default install, and not Linux.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 08-04-10, 01:16
shashankj shashankj is offline
Registered User
 
Join Date: Mar 2010
Posts: 13
I see db2inst1 belongs to 2 groups: db2iadm1 and dasadm1.
I have added user dummy to botg groups (dummy user is also dummy group member)
But I still same issue.
Reply With Quote
  #6 (permalink)  
Old 08-04-10, 01:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Post the output of this:

db2 "select * from syscat.dbauth"
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #7 (permalink)  
Old 08-04-10, 01:26
shashankj shashankj is offline
Registered User
 
Join Date: Mar 2010
Posts: 13
It's difficlut to keep the format of output. I hope below output is readable.

db2inst1@DB2:~> db2 "select * from syscat.dbauth"

GRANTOR GRANTORTYPE GRANTEE GRANTEETYPE BINDADDAUTH CONNECTAUTH CREATETABAUTH DBADMAUTH EXTERNALROUTINEAUTH IMPLSCHEMAAUTH LOADAUTH NOFENCEAUTH QUIESCECONNECTAUTH LIBRARYADMAUTH SECURITYADMAUTH SQLADMAUTH WLMADMAUTH EXPLAINAUTH DATAACCESSAUTH ACCESSCTRLAUTH

SYSIBM S DB2INST1 U N N N Y N N N N N N Y N N N Y Y
SYSIBM S PUBLIC G Y Y Y N N Y N N N N N N N N N N
DB2INST1 U COGNOS U N N N Y N N N N N N N N N N Y Y
DB2INST1 U COGNOS1 U N N N Y N N N N N N N N N N Y Y

4 record(s) selected.

db2inst1@DB2:~>

Last edited by shashankj; 08-04-10 at 01:31.
Reply With Quote
  #8 (permalink)  
Old 08-04-10, 02:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by shashankj View Post
It's difficlut to keep the format of output. I hope below output is readable.

db2inst1@DB2:~> db2 "select * from syscat.dbauth"

GRANTOR GRANTORTYPE GRANTEE GRANTEETYPE BINDADDAUTH CONNECTAUTH CREATETABAUTH DBADMAUTH EXTERNALROUTINEAUTH IMPLSCHEMAAUTH LOADAUTH NOFENCEAUTH QUIESCECONNECTAUTH LIBRARYADMAUTH SECURITYADMAUTH SQLADMAUTH WLMADMAUTH EXPLAINAUTH DATAACCESSAUTH ACCESSCTRLAUTH

SYSIBM S DB2INST1 U N N N Y N N N N N N Y N N N Y Y
SYSIBM S PUBLIC G Y Y Y N N Y N N N N N N N N N N
DB2INST1 U COGNOS U N N N Y N N N N N N N N N N Y Y
DB2INST1 U COGNOS1 U N N N Y N N N N N N N N N N Y Y

4 record(s) selected.

db2inst1@DB2:~>
Try this:
db2 connect to TEST
db2 "GRANT DBADM ON DATABASE TO USER dummy"
db2 "select * from syscat.dbauth"

If you don't see dummy in this table as a GRANTEE, then you have a major problem.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Tags
access

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On