Posted by The TechMentor in Journal
on Jan 31st, 2013
#!/bin/bash # members -- list all members of a group # # SYNOPSIS # members groupname # # http://superuser.com/questions/279891/list-all-members-of-a-group-mac-os-x # by Arne # Expected to work on Mac OS 10.5 and newer, tested on 10.6 and 10.7. # It could be rewritten to work on 10.4 by using "dseditgroup -o checkmember" # instead of "dsmemberutil checkmembership". # By using dseditgroup, the script could also be extended to handle # other Directory Service nodes than the default local node. # the_group="$1" # Input check and usage if [[ $# != 1 || $1 == -* ||...
Posted by The TechMentor in Journal, System Monitoring
on Jan 23rd, 2013
After what seemed like days of messing with permissions, SELinux was the problem. To solve the dreaded Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!” error, when trying to reschedule a test or acknowledge an alert, a simple setenforce 0 was the solution. Though, permissions do also have to be correct. chown nagios.nagcmd /usr/local/nagios/var/rw chmod g+rwx /usr/local/nagios/var/rw chmod g+s /usr/local/nagios/var/rw