# 01-defaults-write.sh
#!/bin/bash
# OS X 10.9.2
#
#---------------------------------------------------------------------
# defaults write
#---------------------------------------------------------------------
# AirDrop NetworkBrowser
sudo defaults write /Library/Preferences/com.apple.NetworkBrowser DisableAirDrop -bool Yes
sudo defaults write /Library/Preferences/com.apple.NetworkBrowser BrowseAllInterfaces -bool No
defaults write com.apple.NetworkBrowser DisableAirDrop -bool Yes
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool No
# aperance
sudo defaults write com.apple.recentitems Applications -dict MaxAmount 0
sudo defaults read com.apple.recentitems
# power of blutooth
sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 0
defaults read /Library/Preferences/com.apple.Bluetooth
# blank cd
sudo defaults write /library/preferences/com.apple.digihub com.apple.digihub.blank.cd.appeared -dict action 1
sudo defaults write /library/preferences/com.apple.digihub com.apple.digihub.blank.cd.appeared -dict action 1
sudo defaults write /library/preferences/com.apple.digihub com.apple.digihub.cd.music.appeared -dict action 1
sudo defaults write /library/preferences/com.apple.digihub com.apple.digihub.cd.picture.appeared -dict action 1
sudo defaults write /library/preferences/com.apple.digihub com.apple.digihub.blank.dvd.appeared -dict action 1
sudo defaults write /library/preferences/com.apple.digihub com.apple.digihub.blank.dvd.video.appeared -dict action 1
sudo defaults read /library/preferences/com.apple.digihub
# scrennsaver
sudo defaults -currentHost write com.apple.screensaver askForPassword -int 1
sudo defaults write /Library/Preferences/.GlobalPreferences.plist com.apple.userspref.DisableAutoLogin -bool yes
sudo defaults write /Library/Preferences/.GlobalPreferences.plist com.apple.autologout.AutoLogOutDelay -int 0
# Memory
sudo defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -bool yes
# IR
sudo defaults write /Library/Preferences/com.apple.driver.AppleIRController DeviceEnabled -bool no
# firewall
sudo defaults write /Library/Preferences/com.apple.alf stealthenabled 1
sudo defaults write /Library/Preferences/com.apple.alf loggingenabled 1
sudo defaults write /Library/Preferences/com.apple.alf loggingoption 1
defaults read /Library/Preferences/com.apple.alf
# SWAP
sudo defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -bool YES
# Time Machine OFF
sudo defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup 0
defaults read /Library/Preferences/com.apple.TimeMachine
# disable speech
sudo defaults write "com.apple.speech.recognition.AppleSpeechRecognition.prefs" StartSpeakableItem -bool false
# disable text speech
sudo defaults write "com.apple.speech.synthesis.general.prefs" TalkingAlertsSpeakTextFlag -bool false
sudo defaults write "com.apple.speech.synthesis.general.prefs" SpokenNotificationAppActivationFlag -bool false
sudo defaults write "com.apple.speech.synthesis.general.prefs" SpokenUIUseSpeakingHotKeyFlag -bool false
#---------------------------------------------------------------------
# Bluetooth Sharing
#---------------------------------------------------------------------
# Bluetooth OFF
sudo defaults -currentHost write com.apple.bluetooth PrefKeyServicesEnabled 0
sudo defaults -currentHost read com.apple.bluetooth
#---------------------------------------------------------------------
# Nat
#---------------------------------------------------------------------
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat Nat -dict Enabled -int 0
sudo defaults read /Library/Preferences/SystemConfiguration/com.apple.nat
#{
# Nat = {
# Enabled = 0;
# };
#}
sudo chmod 0 /usr/sbin/natd
# original mode
#$ ls -la /usr/sbin/natd
#-r-xr-xr-x 1 root wheel 114720 4 1 2010 /usr/sbin/natd
# 参考にしたところ
Mac OS X Security Configuration Guides
http://www.apple.com/support/security/guides/
0 件のコメント:
コメントを投稿