Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:47 PM
06-19-2001 11:47 PM
triggers
I have small requirement .I want to have some notifiaction not in term of mail eaxcatly whenever my etc/services and /etc/passwd ,group file is changed.I want this notification in a file.Which i can view on daily basis.Can anybody help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:52 PM
06-19-2001 11:52 PM
Re: triggers
--------cut here-----------
# Etc watcher
ls -l /etc/passwd >> /tmp/etclog
ls -l /etc/passwd >> /tmp/etclog
--------cut here----------
The above short script will do it just cron it to run as and when you require. Then just check the log file each day.
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2001 12:55 AM
06-20-2001 12:55 AM
Re: triggers
Thanks for the reply.But can u explain it .I did not get your clue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2001 01:12 AM
06-20-2001 01:12 AM
Re: triggers
The ls -l /etc/passwd >> /tmp/etclog will do a long listing of the file passwd in /etc and using the >> will send this information to a file in /tmp called etclog (a new file)
The double >> will just add and entry above the last one:-
-r--r--r-- 1 root other 96421 Jun 18 14:34 /etc/passwd
-r--r--r-- 1 root other 96421 Jun 19 14:34 /etc/passwd
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2001 01:22 AM
06-20-2001 01:22 AM
Re: triggers
you can do the following :
1. Create a script in /home/tmp with name generateOriginal.sh
it's content is :
/usr/bin/ls -l /etc/passwd > /home/tmp/originalTimeStamp.log
2.Create a script in /home/tmp with name generateActual.sh
it's content is :
/usr/bin/ls -l /etc/passwd > /home/tmp/actualTimeStamp.log
3. Create a script in /home/tmp with name compareTimeStamp.sh
it's content is :
/usr/bin/diff /home/tmp/originalTimeStamp.log /home/tmp/actualTimeStamp.log > /home/tmp/compareTimeStamp.log
4. execute crontab -e command and add the following ONE LINE:
00 17 * * * /home/tmp/compareTimeStamp.sh
5. You should change the mode of scripts in order to be able to execute them :
/usr/bin/chmod 700 generateOriginal.sh generateActual.sh compareTimeStamp.sh
And each day check the content of file /home/tmp/compareTimeStamp.log, if the /etc/passwd is still unchanged, th size of file /home/tmp/compareTimeStamp.log will be ZERO. If the size is different from ZERO so the content of /home/tmp/compareTimeStamp.log will show you what had changed in /etc/passwd.
You can do the same for any other file.
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2001 01:46 AM
06-20-2001 01:46 AM
Re: triggers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2001 05:25 AM
06-20-2001 05:25 AM