This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Values that are site specific | |
property labAdmin : "labadmin" | |
-- Commands used by this script | |
property awk : "/usr/bin/awk" | |
property dscl : "/usr/bin/dscl" | |
property idcmd : "/usr/bin/id" | |
property scutil : "/usr/sbin/scutil" | |
property ping : "/sbin/ping" | |
property ifconfig : "/sbin/ifconfig" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -xv | |
export BUILDVERSION="2009051" | |
# Email settings for the sendEmailNow Function | |
export EMAIL_SERVER="172.16.15.27" | |
export EMAIL_TO="[email protected]" | |
export EMAIL_FROM="`/bin/hostname`@example.com" | |
# User Configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Required commands | |
declare -x awk="/usr/bin/awk" | |
declare -x dscl="/usr/bin/dscl" | |
declare -x defaults="/usr/bin/defaults" | |
declare -x du="/usr/bin/du" | |
declare -x id="/usr/bin/id" | |
declare -x ntpdate="ntpdate" | |
declare -x scutil="/usr/sbin/scutil" | |
declare -x perl="/usr/bin/perl" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configure the value here for the timeout value | |
declare -xi AD_TIME_OUT_VALUE="10" | |
declare -x defaults="/usr/bin/defaults" | |
declare -x plutil="/usr/bin/plutil" | |
[ "$EUID" != 0 ] && | |
printf "%s\n" "This script requires root access! (try sudo \"$0\")" && exit 1 | |
# See how this function is used in script code below |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -xi IS_DS="`hostname | grep -o ds01 -c`" | |
# FS Config | |
setupFSPromise(){ | |
IFS=" " | |
declare -x VOL_NAME="Storage" | |
declare -x DRIVE_SIZE="1.9T" | |
diskutil partitionDisk "$BSD_DISK" 1 APM HFS+ "$VOL_NAME" "$DRIVE_SIZE" | |
if [ -d "/Volumes/$VOL_NAME" ] ; then | |
mkdir -p "/Volumes/$VOL_NAME/APPS" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -x USER_NAME="$1" | |
# Commands | |
declare -x awk="/usr/bin/awk" | |
declare -x date="/bin/date" | |
declare -x ping="/sbin/ping" | |
declare -x scutil="/usr/sbin/scutil" | |
declare -x sed="/usr/bin/sed" | |
declare -x grep="/usr/bin/grep" | |
declare -x netstat="/usr/sbin/netstat" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* A Script written to assist with Narrowing down User Authentication Issues *) | |
property idcmd : "/usr/bin/id" | |
property theDirNode : (quoted form of "/Active Directory/All Domains") | |
property theDirNodeSuffix : "All Domains" | |
property userNameResult : "User Lookup Failure" | |
global userName | |
on promptForUserName() | |
-- Prompt for username | |
set askForUserName to display dialog "Please enter the username in: " & return & space & theDirNode & return & space & "to test authentication with:" buttons {"Cancel", "Continue"} default button "Continue" default answer "adusername" with icon 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set -xv | |
declare -x DIRECTORY_ADMIN="diradmin" | |
declare -x DIRECTORY_PASS="foobar" | |
declare -x REMOTE_LDAP_SERVER="server.example.com" | |
declare -x REMOTE_SEARCH_BASE="dc=server,dc=example,dc=com" | |
[ "$EUID" != 0 ] && | |
printf "%s\n" "This script requires root access!" && exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BEGIN Configuration Options: | |
declare -x BUILD_VERSION="20110608" | |
declare -x DIRADMIN_UID="1000" | |
# The following should not contain the users or groups container | |
# The NEW Open Directory Master information | |
declare -x DIRADMIN_IMPORT="diradmin" | |
declare -x DIRADMIN_PASS_IMPORT='foo' | |
declare -x SEARCH_BASE_IMPORT="dc=new,dc=example,dc=com" | |
declare -x SERVER_HOSTNAME_IMPORT="new.server.example.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for USER_NAME in `dscl /LDAPv3/127.0.0.1 -list /Users` ; do | |
if dscl /Search -authonly "$USER_NAME" 'defaultpass' &>/dev/null ; then | |
echo "Found user $USER_NAME with default password" | |
fi | |
done |