X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Finit%2Fosx105-addusers.sh;h=07f2cb9ad36d32d5a04d0c6fbea63ce212a01da6;hp=6bc1cab606cc88f8951316916b8f50c7da88ea86;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/init/osx105-addusers.sh b/src/init/osx105-addusers.sh old mode 100644 new mode 100755 index 6bc1cab..07f2cb9 --- a/src/init/osx105-addusers.sh +++ b/src/init/osx105-addusers.sh @@ -1,13 +1,5 @@ #! /bin/bash # By Spransy, Derek" and Charlie Scott -# -# alterations by bil hays 2013 -# -Switched to bash -# -Added some sanity checks -# -Added routine to find the first 3 contiguous UIDs above 100, -# starting at 600 puts this in user space -# -Added lines to append the ossec users to the group ossec -# so the the list GroupMembership works properly ##### # This checks for an error and exits with a custom message @@ -24,13 +16,13 @@ fi DSCL="/usr/bin/dscl"; function check_errm - { +{ if [[ ${?} != "0" ]] then echo "${1}"; exit ${2}; fi - } +} # get unique id numbers (uid, gid) that are greater than 100 unset -v i new_uid new_gid idvar; @@ -125,4 +117,3 @@ else sudo ${DSCL} localhost -createprop /Local/Default/Users/ossec Password "*" fi -