In this example, we report group file problems as found by the standard grpck program. Although you might use other means to monitor and report problems with /etc/group--for example, utilize the Pikt script GroupFileProblemsWarning--you might also want to consult grpck for added reassurance.
The GrpckWarning script might send an alert message like the following:
-------------------------------------------------------------------------------
PIKT ALERT
Fri Jul 25 02:26:30 2003
montreal
WARNING:
GrpckWarning
Report /etc/group file problems as found by grpck
group users: no user gflynn
delete member `gflynn'? No
-------------------------------------------------------------------------------
The script follows.
///////////////////////////////////////////////////////////////////////////////
//
// accounts_alarms.cfg
//
///////////////////////////////////////////////////////////////////////////////
[other alarms omitted...]
///////////////////////////////////////////////////////////////////////////////
GrpckWarning
init
status active
level warning
task "Report /etc/group file problems as found by grpck"
input proc "=grpck -r 2>&1 | =egrep -v 'no changes'"
rule
output mail $inlin
///////////////////////////////////////////////////////////////////////////////
[other alarms omitted...]
///////////////////////////////////////////////////////////////////////////////
In this script, the grpck program does the real work. We wrap grpck within the GrpckWarning Pikt script to take advantage of PIKT's scheduling, reporting, and logging facilities.
[For more examples, see Samples.]
Home |
FAQ |
News |
Intro |
Samples |
Tutorial |
Reference |
Software |
Authors |
Licensing |
SiteSearch
Links |
SiteIndex |
Pikt-Users |
Pikt-Workers |
Contribute |
ContactUs |
Top of Page
Page best viewed at 1024x768.
Page last updated 2005-06-22.
This site is
PIKT®
powered.
PIKT® is a registered trademark of the University of Chicago.
Copyright © 1998-2005 Robert Osterlund. All rights reserved.
|