1#!/bin/sh
2#Declare Variables
3OSVer=`sw_vers -productVersion`
4HWType=`/usr/sbin/system_profiler SPHardwareDataType | grep "Model Identifier" | grep "Book"`
5
6#This sets the login window and screen saver preferences.
7defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "You are accessing a [redacted] computer network for authorized users only. Use of the network constitutes consent to all [redacted] IT policies. For further information regarding those policies, refer to [silly, unclickable web url]."
8defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool YES
9defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool YES
10defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array ardamin
11defaults write /Library/Preferences/com.apple.loginwindow ShutDownDisabledWhileLoggedIn -bool NO
12defaults write /Library/Preferences/com.apple.loginwindow RestartDisabledWhileLoggedIn -bool NO
13defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo -string 'DSStatus'
14defautls write /Library/Preferences/com.apple.loginwindow showInputMenu -bool YES
15echo "Loginwindow settings configured."
16
17#Disables Bluetooth.
18#defaults write /Library/Preferences/com.apple.MCXBluetooth DisableBluetooth -dict state -string 'always' -bool YES
19#defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState -int 0
20#echo "Bluetooth preferences configured."
21
22#Removes Bluetooth and Time Machine from the Menu Bar.
23defaults -currentHost write "/System/Library/User Template/English.lproj/Library/Preferences/ByHost/com.apple.systemuiserver" dontAutoLoad -array -string "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" -string "/System/Library/CoreServices/Menu Extras/Bluetooth.menu"
24echo "Removed Bluetooth and Time Machine from the Menu Bar."
25
26# This script disables fast user switching.
27defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool NO
28echo "Fast user switching disabled."
29
30#Use encrypted virtual memory
31defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -bool YES
32echo "Virtual memory secured."
33
34# Set Safari Preferences.
35defaults write /Library/Preferences/com.apple.Safari HomePage "http://www.unf.edu/"
36defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.Safari" ShowStatusBar -bool YES
37echo "Safari Settings configured."
38
39# NO .ds-store files on Network Shares
40defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores -bool YES
41echo "DS store files disabled."
42
43# Set Apple Mouse button 1 to Primary click and button 2 to Secondary click.
44defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.driver.AppleHIDMouse" Button1 -integer 1
45defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.driver.AppleHIDMouse" Button2 -integer 2
46echo "Apple Mouse settings configured."
47
48# Set Apple Magic Mouse button 1 to Primary click and button 2 to Secondary click.
49defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse" MouseButtonMode -string TwoButton
50echo "Magic Mouse settings configured."
51
52# Disable Time Machine Offers & Auto Backup
53defaults write /Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool YES
54defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup 0
55echo "Time Machine settings complete."
56
57#Disable iCloud
58defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion -string $OSVer
59defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool YES
60echo "iCloud disabled."
61
62#Configures Office AutoUpdate
63defaults write /Library/Preferences/com.microsoft.autoupdate2 HowToCheck -string Manual
64defaults write /Library/Preferences/com.microsoft.autoupdate2 LastUpdate -date '2001-01-01T00:00:00Z'
65echo "Office Autoupdate set to manual."
66
67#Configures Office Error Reporting
68defaults write /Library/Preferences/com.microsoft.error_reporting SQMReportsEnabled -bool NO
69defaults write /Library/Preferences/com.microsoft.error_reporting ShipAssertEnabled -bool NO
70echo "Office Error Reporting set."
71
72#Configure Office Setup
73defaults write /Library/Preferences/com.microsoft.office "14UserInfoUserOrganiation" -string 'University of North Florida'
74defaults write /Library/Preferences/com.microsoft.office "14FirstRunSetupComplete" -int 1
75defaults write /Library/Preferences/com.microsoft.office "14UserInfoUserName" -string 'Information Technology Services'
76echo "Office Setup configured."
77
78#Hides Office Welcome Windows
79defaults write /Library/Preferences/com.microsoft.Excel "14Microsoft ExcelHide Welcome Window" -int 1
80defaults write /Library/Preferences/com.microsoft.Outlook FirstRunExperienceCompleted -bool YES
81defaults write /Library/Preferences/com.microsoft.PowerPoint "14OptionsOptionsHide Welcome Dialog" -int 1
82defaults write /Library/Preferences/com.microsoft.Word "14OptionsHide Welcome Dialog" -int 1
83echo "Office Welcome Windows disabled."
84
85#Hides Document Galleries
86defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.microsoft.office" "14File New StateFNXCEL" -int 0
87defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.microsoft.office" "14File New StateFNPPT3" -int 0
88defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.microsoft.office" "14File New StateFNMSWD" -int 0
89echo "Office Galleries disabled."
90
91#Sets Finder Preferences
92defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.finder.plist" ShowMountedServersOnDesktop -bool YES
93defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.finder.plist" ShowHardDrivesOnDesktop -bool YES
94defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.finder.plist" ShowRemovableMediaonDesktop -bool YES
95defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.finder.plist" ShowExternalHardDrivesOnDesktop -bool YES
96defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.finder.plist" ProhibitGoToiDisk -bool YES
97defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.finder.plist" ShowStatusBar -bool YES
98echo "Finder Settings complete."
99
100#Disables Location Services
101defaults write /Library/Preferences/com.apple.MCX DisableLocationServices -bool YES
102echo "Location Services disabled."
103
104#iWork Registration Removal
105defaults write /Library/Preferences/com.apple.iWork09 RegistrationHasBeenSent -bool YES
106echo "iWork Settings complete."
107
108#Sets Screensaver lock settings
109defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.screensaver" askForPasswordDelay -string 1800
110defaults write "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.screensaver" askForPassword -int 1
111echo "Screensaver Settings complete."
112
113if [[ "$OSVer" = "10.9"* ]]; then
114if [ -n "$HWType" ]; then
115 defaults write /Library/Preferences/com.apple.mdmclient BypassPreLoginCheck -bool YES
116fi
117fi