Pwck Problems

In this example, we report passwd and shadow file problems as found by the standard pwck program.  Although you might use other means to monitor and report problems with the /etc/passwd and /etc/shadow files--for example, utilize the Pikt script PasswdFileProblems--you might also want to consult pwck for added reassurance.

The Pwck script might send an alert message like the following:

                                PIKT ALERT
                         Mon Oct 20 02:49:19 2003
                                  ankara

WARNING:
    Pwck
        Report /etc/passwd & /etc/shadow file problems as found by pwck

        no matching password file entry
        delete line `staff:!:12515:0:99999:7:::'? No

The script follows.

Pwck

        init
                status =piktstatus
                level =piktlevel
                task "Report /etc/passwd & /etc/shadow file problems
                      as found by pwck"
                input proc "=pwck -r 2>&1 | =egrep -v 'no changes'"

        rule
                output mail $inlin

In this script, the pwck program does the real work.  We wrap pwck within the Pwck 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
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
Learn about the
keys.conf
config file