#!/bin/bash

curhash=`/bin/sudo /bin/grep -w root /etc/shadow | cut -d: -f 2`
oldhash=`/bin/sudo /bin/cat /etc/shadow_comp`

if [ "$curhash" = "$oldhash" ]; then
        echo "OK: root pass hash fine"
        exit 0
else
        echo "CRITICAL: root pass hash changed"
        exit 2
fi
