Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scripts

Status
Not open for further replies.

venkatmk

IS-IT--Management
Dec 1, 2000
16
0
0
US
Hi

Let me know any body is having the following scripts.

1. script to check for the .rhosts file and housts.equiv files in system, if .rhosts exists send it to trash and if housts.equiv exists make sure it is empty.

2. script to check whether the applications is up or not
is not mail to administrator.

Rgds

Venkat
 
venkatmk, I always find it's a good idea to do a bit of research if you're unsure how to do something. It makes learning more worthwhile, and in my opinion, makes it stay in your head!. As a first point of call, have look at the following man pages on your system ...

man test - this explains how to check for the existence of files, directories, empty files, etc.

man ps - explains how to check for running processes

man grep - allows you to search for a specific string in the input ...

so you could use ps andgrep together to check for a running application, and if you find it, use the mail command.

Hope this sets you on your way. If, after this, you have any other queries, post again and we'll be happy to help.

Greg.


 
i've come across a good way of stopping .rhosts ...

as root create a .rhosts file in the users home, and set it so that noone can write to it, and _definately_ set the user to root:sys ... and that way they can _never_ put anything in those files, so no need to check.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top