James
Thanks for your prompt (as usual) assistance.
It appears that the actionsvr daemon does run as root (whoami returns "root").
I put the .netrc file in the pwd returned for actionsvr rather than root's home
directory and the rexec worked.
The directory required was /usr/OV/PD/cores/actionsvr
The reason I am doing this is convoluted but I want to email users when certain
problems occur and I want to use the trap description lines between the SDESC &
EDESC areas in trapd.conf in the email as they have been tailored for our site.
I was led to believe from previous posts that this customised information is
not supplied in the trap data so I have a cron job that ftp's the trapd.conf
file from my netview box to the solaris box each night. Once on the solaris box
I have a program that extracts the trap descriptions stuff and indexes it by
the enterprise ID and trap numbers so I can do a real quick recovery of the
trap description for any trap I get.
The rexec in the rule driven script will then run another program on the
solaris box that formats the emails and include this description stuff so the
recipient has the full story.
Cheers & thanks for your help - Gavin
>>> <James_Shanks@tivoli.com> 04/10/2000 02:39:27 >>>
Well, you have me. Don't think I have ever seen this done before. But
technically speaking, NetView does not use root, though its processes have
root authority, we get tht by default. Try putting your rexec in a script
and before it executes have it issue "whoami" and "pwd" and "path" and
echo that output to a file.
James Shanks
Team Leader, Level 3 Support
Tivoli NetView for UNIX and NT
"Gavin Newman" <NEWMANGJ@stgeorge.com.au> on 10/03/2000 04:26:22 AM
Please respond to IBM NetView Discussion <nv-l@tkg.com>
To: nv-l@tkg.com
cc: (bcc: James Shanks/Tivoli Systems)
Subject: [NV-L] Running rexec from a rule driven shell script
I am presently running a shell script based on certain events within my
netview rules.
The script currently sends an email to users and the email appears to come
from the root
user on the netview box (netview is running on AIX).
I wanted to change the script so it rexec'ed a program on a Solaris box
that I have so, given that
the netview rules seemed to use the root userid I created a .netrc in
root's home directory
that contained a machine / login / password entry for the solaris box so
the rexec would auto-login
to the solaris box with no user prompts.
When I run the script from a root shell on the netview box everything is OK
but when I run
it from the netview rule it fails. I redirected the STDOUT from the rexec
command to a file
and it "appears" to contain the start of a user prompt.
Does netview really use the root user or am I being fooled by the email
step described above?
Cheers - Gavin
**********************************************************************
***** IMPORTANT INFORMATION *****
This document should be read only by those persons to whom
it is addressed and its content is not intended for use by
any other persons. If you have received this message in
error, please notify us immediately. Please also destroy and
delete the message from your computer. Any unauthorised form
of reproduction of this message is strictly prohibited.
St.George is not liable for the proper and complete transmission
of the information contained in this communication, nor for any
delay in its receipt.
**********************************************************************
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
**********************************************************************
***** IMPORTANT INFORMATION *****
This document should be read only by those persons to whom
it is addressed and its content is not intended for use by
any other persons. If you have received this message in
error, please notify us immediately. Please also destroy and
delete the message from your computer. Any unauthorised form
of reproduction of this message is strictly prohibited.
Bank SA is not liable for the proper and complete transmission
of the information contained in this communication, nor for any
|