Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2010
    Posts
    13

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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.
    Last edited by Marcus_A; 08-04-10 at 00:12.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    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.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    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.

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  7. #7
    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 02:31.

  8. #8
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •