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 > Root Required? Best Practices?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-06, 10:23
LBussy LBussy is offline
Registered User
 
Join Date: Aug 2006
Posts: 7
Root Required? Best Practices?

As you all probably are painfully aware, root access is required to do installations. In a larger group or set of groups this sometimes presents an issue. I was wondering what some of you have done to get around this?

I've poked about a bit for any real solutions, but have turned up nothing of value, perhaps I'm using the wrong magic words.

DB2 code release "SQL08020" with level identifier "03010106".
Informational tokens are "DB2 v8.1.1.64", "s040812", "U498350", and FixPak "7".
DB2 Enterprise Server Edition 8.2
Reply With Quote
  #2 (permalink)  
Old 08-10-06, 10:37
jujones jujones is offline
Registered User
 
Join Date: May 2006
Location: Waco, KY
Posts: 18
We are temporarily given root access for the install. The SAs give it a temp password then change it back when we are done. Sometimes they are sitting with us to make sure we don't do anything stupid.

Julie
Reply With Quote
  #3 (permalink)  
Old 08-10-06, 10:45
LBussy LBussy is offline
Registered User
 
Join Date: Aug 2006
Posts: 7
Thanks for the reply.

I thought about that ... but having recently moved from the SA arena to the DB side, I can poke holes full of that before I even ask. For starters, it's incredibly easy to change more than just database related objects, either accidentally or intentionally. Also, instance creation is not always done on a new box, sometimes we add to an existing installation on a production system.

Sitting the SA/DBA down together is a viable solution if you are in one building, but we have teams across the country and sometimes we're separated by two timezones and thousands of miles.

In this time of SOX compliance requirements, it's hard to do anything easy anymore.

I was thinking that adding sudo entries to allow the DBA to run the various scripts as root might be a potential solution but I was hoping there was a glamorous solution out there, or at least an accepted one I with which could make a case.
Reply With Quote
  #4 (permalink)  
Old 08-10-06, 12:02
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Most places I have been have the SA run the install script to lay down the DB2 code, and then give the DBA's sudo root athority on the DB2 paths to do instance creates, instance upgrades, etc.
__________________
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-10-06, 13:48
LBussy LBussy is offline
Registered User
 
Join Date: Aug 2006
Posts: 7
Quote:
Originally Posted by Marcus_A
Most places I have been have the SA run the install script to lay down the DB2 code, and then give the DBA's sudo root athority on the DB2 paths to do instance creates, instance upgrades, etc.
I'm with you on the sudo, but do they really wildcard the paths? That's really dangerous. I was thinking more like identifying 5-6 executables or scripts that need to be able to run as root (read only of course).
Reply With Quote
  #6 (permalink)  
Old 08-10-06, 20:44
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
All the executables that DBA's need are under the "instance" sub-directory in the DB2 install (or alternate fixpack) directory. I can't think of any executables in that directory that a DBA should not be given authority to run with sudo root.
__________________
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-10-06, 21:00
LBussy LBussy is offline
Registered User
 
Join Date: Aug 2006
Posts: 7
Quote:
Originally Posted by Marcus_A
All the executables that DBA's need are under the "instance" sub-directory in the DB2 install (or alternate fixpack) directory. I can't think of any executables in that directory that a DBA should not be given authority to run with sudo root.
Understood ... but if sudo permission (via sudoers file) is given for the directory:

dba_account workstation = /usr/local/instance_dir/blah/*

... and the DBA's own that directory as well (common) then they could conceivably put a potentially malicious piece of code in that directory and execute it as root. In addition, if a particular script supports shell escapes, that leaves a pretty big hole.

So, I agree with you that they should be in charge of their own destiny, but I guess the SA in me (not too distant past) gets a little worried at wildcard anything.

What's really ironic is I never saw the requirement to run anything as root to create an instance as a particularly bothersome situation when I was an SA. Now that I (my group actually) doesn't have root access, I feel the pain.
Reply With Quote
  #8 (permalink)  
Old 08-10-06, 22:59
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
The directory that DBA's need sudo on is not the directory for the instance (which is the home directory of the instance owner), but literally the instance sub-directory of the DB2 binaries.

For example on AIX that would be:

/usr/opt/db2_08_01/instance

I believe that on Linux it is:

/opt/IBM/db2/db2_08_01/instance (or something close to that)
__________________
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
  #9 (permalink)  
Old 08-11-06, 09:34
LBussy LBussy is offline
Registered User
 
Join Date: Aug 2006
Posts: 7
Marcus,

I understand what you are saying. I'm the new guy here; you seem to be knowledgeable and definitely a prolific poster on this forum. I'm trying not to argue with someone who took the time to answer one of my questions. Really. :-) I'm just pointing out why someone reading this may not get a wildcard or why an SA would not want to do it.

A brief glance at those scripts shows that they do trap exits but I have not checked them all. A security conscious SA would be well advised to look at them all, or perhaps even put them in a wrapper.

Aside from installation, are there any other scripts in any other locations that you can think of that need to be run by root?

Last edited by LBussy; 08-11-06 at 09:42.
Reply With Quote
  #10 (permalink)  
Old 08-11-06, 16:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You can argue with me if you want to. The number of posts I have made is not relevent.

I didn't mean that a wildcard has to be used on that directory, just that the DBA's needs sudo on all the DB2 commands in that directory.

The only commands that I know of that DBA's need sudo on are located in /usr/opt/db2_08_01/instance (different for other OS's).
__________________
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
  #11 (permalink)  
Old 08-12-06, 16:16
LBussy LBussy is offline
Registered User
 
Join Date: Aug 2006
Posts: 7
I'm just trying not to be an annoying new guy is all ... whether that's possible for me is another thing.

Thanks for the information, I'll talk with the SA's about this next week and see what happens.
Reply With Quote
Reply

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