X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-nrpe-config%2Fdebian%2Fpostinst;h=0749532da5516fa167ca51a6cf105f1b17665466;hb=4af5c3a8dbc0f3359e1b1860490fe3d11a09941c;hp=7b7ea12e03b6794681b9c1da7720269101c1faf8;hpb=f02a3a317be3bccd97c2a1249cd5ee93334eac33;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-nrpe-config/debian/postinst b/dsa-nagios-nrpe-config/debian/postinst index 7b7ea12..0749532 100644 --- a/dsa-nagios-nrpe-config/debian/postinst +++ b/dsa-nagios-nrpe-config/debian/postinst @@ -47,14 +47,30 @@ if [ -e /etc/sudoers ] ; then fi fi +if [ -e /etc/sudoers ] ; then + if ! grep '^nagios.*/usr/sbin/samhain' /etc/sudoers > /dev/null; then + echo + echo 'WARNIG: Add this line to sudoers:' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/samhain -t check --foreground -p err -s none -l none -m none' + echo + fi +fi + if [ -e /usr/sbin/hpacucli ] && [ -e /dev/cciss/c0d0 ] ; then if ! grep '^nagios.*hpacucli' /etc/sudoers > /dev/null; then echo echo 'WARNIG: Add these lines to sudoers:' echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller all show' echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd all show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd [0-9]\:[0-9] show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd [0-9]I\:[0-9]\:[0-9] show' echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 show status' echo + elif ! grep '^nagios.*hpacucli.* pd .*:.* show' /etc/sudoers > /dev/null; then + echo + echo 'WARNIG: Add these lines to sudoers:' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd [0-9]\:[0-9] show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd [0-9]I\:[0-9]\:[0-9] show' fi fi @@ -64,6 +80,8 @@ else /etc/init.d/nagios-nrpe-server restart || exit $? fi +/usr/share/dsa/weak-ssh-keys-check -s /var/cache/dsa/nagios/weak-ssh-keys + #DEBHELPER# exit 0