1850397 Members
2304 Online
104054 Solutions
New Discussion

remsh in big brother

 
SOLVED
Go to solution
MarkSyder
Honored Contributor

remsh in big brother

Hi everybody.

I've set up a shell script on the main big brother server to search and destroy core files on remote servers.

The script checks the bb logs for the presence of the words yellow or red against a filesystem. It then does a remsh to the server to look for core files in the affected filesystem(s).

It works fine from the command line - I've set up two dummy core files on a remote server and it finds and deletes them. But when it runs from bb, it reports that there are no core files on the remote server. The command line test and the bb test are on the same remote server, so remsh to that server is allowed.

I've isolated the line with the remsh command as the one where the fault is occurring. I've run just that line from the command line and it works fine.

I'm beginning to wonder if bb can't cope with remsh. Any ideas?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
7 REPLIES 7
Stephen Keane
Honored Contributor

Re: remsh in big brother

Are you using the full path to remsh, when called from bb, when you do it manually you've got your profile to help?

Also, can bb call remsh to do something innocuous like /usr/bin/true w/o error?

Geoff Wild
Honored Contributor

Re: remsh in big brother

Can you post the script?

Sounds like the remsh isn't working right - IE - it deletes (trys to) on local system?

Add a set -x and output the script to a log file - that may reveal something.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
MarkSyder
Honored Contributor

Re: remsh in big brother

Stephen - I've changed the remsh to /usr/bin/remsh to no avail. I then changed the command to ll - again to no avail. Thanks for the suggestions.

Geoff - script to follow.

Mark
The triumph of evil requires only that good men do nothing
Stephen Keane
Honored Contributor
Solution

Re: remsh in big brother

What user does bb run as? Is this a .rhosts problem, as you are using remsh, not ssh? Can you su to bb user and try running remsh from there? (It may not be possible depending upon bb user's passwd file entry I know).
MarkSyder
Honored Contributor

Re: remsh in big brother

We may be on to something Stephen.

I've added bb to .rhosts and tried switching user to bb and running remsh. I get the error message remshd: Login incorrect.

I've been trying to upload the script, Geoff, but I've been having problems posting.

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: remsh in big brother

Script as requested.

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: remsh in big brother

Sorted - thanks Stephen (and Geoff for the suggestion).

All I needed to do was add a .rhosts file to bb's home directory.

Mark
The triumph of evil requires only that good men do nothing