>

A script to play with later…

#!/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 == -* ||...
read more

CentOS 6.x and Nagios – Allow Nagios to run external commands…

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
read more