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 | |
to_remove=( | |
"/Applications/Utilities/Adobe Flash Player Install Manager.app" | |
"/Library/Internet Plug-Ins/Flash Player.plugin" | |
"/Library/Internet Plug-Ins/flashplayer.xpt" | |
"/Library/PreferencePanes/Flash Player.prefPane" | |
"/Library/Receipts/Adobe Flash Player.pkg" | |
) |
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
echo -e "\n# Prohibit password authentication for administrator user\nMatch User <username>\n\tKbdInteractiveAuthentication no\n\tPasswordAuthentication no" >> /etc/ssh/sshd_config |
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
networksetup -listpreferredwirelessnetworks `networksetup -listallhardwareports | awk '/Wi-Fi|AirPort/{getline; print $NF}'` | sed 's/^ //g' |
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
date -jf "%s" "$(sysctl kern.boottime | awk -F'[= |,]' '{print $6}')" +"%Y-%m-%d %T" |
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 | |
# create file to prompt 'softwareupdate' utility to see command line tools as available | |
/usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress | |
# check for command line tools in available software updates | |
toInstall=softwareupdate -l | grep -B 1 -E "Command Line (Developer|Tools)" | awk -F"*" '/^ +\\*/ {print $2}' | sed 's/^ *//' | tail -n1 | |
# install this specific software update | |
/usr/sbin/softwareupdate -i "$toInstall" |
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 interface in $(networksetup -listnetworkserviceorder | grep Hardware | awk '/Wi-Fi/ { print $NF }' | awk -F ")" '{ print $1 }') | |
do | |
echo "Forgetting non-preferred SSID for $interface" | |
networksetup -removepreferredwirelessnetwork $interface <SSID to forget> | |
done | |
exit 0 |
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 | |
defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -bool TRUE | |
defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool TRUE | |
defaults write /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -bool TRUE | |
defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE | |
defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE | |
schedule=$(softwareupdate --schedule on) | |
run_config=$(softwareupdate --background) |
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
sudo usr/sbin/nvram -d fmm-mobileme-token-FMM |
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 | |
localAccts=$(dscl . list /Users UniqueID | awk '$2>500{print $1}' | grep -v <exempt username>) | |
while read account; do | |
echo "Making sure $account is not an admin" | |
dseditgroup -o edit -d $account admin | |
done < <(echo "$localAccts") | |
exit 0 |
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 | |
if [ $(find /Users/<username>/ -mtime -1 -type f -name ".dead_mans_switch" 2>/dev/null) ] | |
then | |
echo "Dead mans switch has been touched today." | |
else | |
echo "Dead mans switch has NOT been touched today. Shutting down now." | |
/sbin/shutdown -h now | |
fi |