#!/bin/sh - csaccts="moose.cs.indiana.edu whale.cs.indiana.edu `hostlist -d passwd`" xxaccts= #`hostlist foreign-passwd` # ckaccts - check accounts configuration # Steve Kinzler, kinzler@cs.indiana.edu, Aug 95 # http://www.cs.indiana.edu/~kinzler/home.html#homedir case $# in 0) ;; *) echo "usage: $0" 1>&2; exit 1;; esac tmp=/tmp/ca$$ tmpC=/tmp/caC$$ tmpX=/tmp/caX$$ trap "rm -f $tmp $tmpC $tmpX; exit" 0 1 2 13 15 echo "$csaccts" | tr ' \011' '\012\012' | sort -u | sed '/^$/d' > $tmpC echo "$xxaccts" | tr ' \011' '\012\012' | sort -u | sed '/^$/d' > $tmpX hosts -l cs | hosts - acct | sort > $tmp comm -23 $tmp $tmpC | sed '1s/^/Invalid cs accounts:\ /' hosts -l cs | hosts - -v acct | sort > $tmp comm -12 $tmp $tmpC | sed '1s/^/Invalid cs !accounts:\ /' hosts -l -v cs | hosts - -v acct | sort > $tmp comm -12 $tmp $tmpX | sed '1s/^/Invalid !cs !accounts:\ /'