#!/bin/bash

curhash=`grep -w root /etc/shadow | cut -d: -f 2`
oldhash=`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
