#!/bin/sh # A work around for KUSU-764 required to get KUSU-749 working. # Re-create the users if they don't already exist. /usr/sbin/useradd -d /var/spool/nagios -r -s /sbin/nologin -c "nagios" nagios 2> /dev/null || : # Add apache to the nagios group. /usr/sbin/usermod -a -G nagios apache > /dev/null 2>&1 || : # Finally, re-set ownership of files in case we now have new [UG]IDs. /bin/chown -R nagios:nagios /var/log/nagios /var/spool/nagios /bin/chgrp -R nagios /etc/nagios/private /bin/chown -R root:nagios /etc/nagios/passwd