Thanks to all that helped. I had in one place set a profile and in another su to the instance. Again, thank all of you for the help.
Mace --- John Summerfield <[EMAIL PROTECTED]> wrote: > LJ Mace wrote: > > I'm trying to finish a script that will bring > > down/backup/zip/restart our database and schedule > it > > using crontab. > > If I su to root and start the script it works > fine. > > I've got everthing working except the down part of > > DB2. > > Everytime I issue the command I get permission > denied. > > I was getting it on the force but I set the > profile > > and that part works. I just can't seem to get > db2stop > > command to work. > > Here is the command I have in the script: > > /opt/IBM/db2/V8.1/adm/db2stop > > What am I missing? > > What's the difference in su and placing something > in > > roots crontab?? > > An obvious difference is that in once case you > generally have a tty > (terminal) and in the other you don't. > > Which distro are you using? > > If RHEL then you may have a different security > context in those > different circumstances. I note that RHEL > /etc/init.d/* use runuser and > not su. For example, see /etc/init.d/postgresql > > > > -- > > Cheers > John > > -- spambait > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > Please do not reply off-list > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access > instructions, > send email to [EMAIL PROTECTED] with the > message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
