diff --git a/System Configs/Configuration Scripts/config_Staff.sh b/System Configs/Configuration Scripts/config_Staff.sh new file mode 100644 index 0000000..58e0651 --- /dev/null +++ b/System Configs/Configuration Scripts/config_Staff.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +########################################################### +# Script Name: Config_Staff.sh +# By: Zack Thompson / Created: 5/14/2015 +# Version: 2.3 / Updated: 9/4/2015 / By: ZT +# +# Description: This is an configuration script to configure existing Macs in the environment. +# +########################################################### + +# ================================================== +# Define Variables +# ================================================== +user=$(logname) +userHome=$(eval echo ~$(echo $user)) + +# ================================================== +# Script Body +# ================================================== + +# Clear ARD Settings +Echo "Clearing ARD Settings..." +sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -uninstall -settings -prefs -configure -privs -none -computerinfo -set1 -1 "" -computerinfo -set2 -2 "" -computerinfo -set3 -3 "" -computerinfo -set4 -4 "" -clientopts -setreqperm -reqperm no -clientopts -setvnclegacy -vnclegacy no -restart -agent + +# Configure ARD Settings +Echo "Configuring ARD Settings..." +sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -privs -all -users ard_admin -allowAccessFor -specifiedUsers -clientopts -setdirlogins -dirlogins yes -setvnclegacy -vnclegacy yes -setvncpw -vncpw 'VNCPassword!' -restart -agent + +# Add Domain Admins AD Group to local admin Group. +Echo "Adding Domain Admins AD Group to local admin Group..." +sudo dseditgroup -o edit -a "Domain Admins" -t group admin + +# Add Domain Users AD Group to local lpadmin Group -- this is the "Print Admin" group. +Echo "Adding Domain Users AD Group to local lpadmin Group..." +sudo dseditgroup -o edit -a "Domain Users" -t group lpadmin + +# Connect to currently logged in (console) user with VNC. +Echo "Setting VNC option to connect to currently logged in (console) user..." +sudo defaults write /Library/Preferences/com.apple.RemoteManagement VNCAlwaysStartOnConsole -bool true + +# Turn off DS_Store file creation on network volumes +Echo "Turnning off DS_Store file creation on network volumes..." +sudo defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true +sudo defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true + +# Disable default file sharing for guest +Echo "Disabling file sharing for guest..." +sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false + +# Disable iCloud & Apple Assistant Popup for new user creation +Echo "Disabling iCloud & Apple Assistant popup for new user creation..." +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion 10.10 +sudo mv /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher.backup +sudo defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.finder.plist ProhibitGoToiDisk -bool YES + +# Disable Time Machine's & pop-up message whenever an external drive is plugged in +Echo "Disabling Time Machine's pop-up message whenever an external drive is plugged in..." +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true +sudo defaults write /Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true +# sudo defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -boolean NO + +# Configure Munki Repo +Echo "Configuring Munki Repo..." +sudo defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "https://osxserver.domain.org/Munki_Repo" +sudo defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "Staff" +sudo defaults write /Library/Preferences/ManagedInstalls InstallAppleSoftwareUpdates -bool True +# sudo defaults write /Library/Preferences/ManagedInstalls SoftwareUpdateServerURL "" + +# Bootstrap Munki; creates file that the Munki deamon checks to see if it exits on start and if it does, will check the repo for software updates. +Echo "Bootstraping Munki..." +touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup + +Echo "Configuration Complete!" +exit 0 diff --git a/System Configs/Configuration Scripts/ds_DeploymentScript_Staff.sh b/System Configs/Configuration Scripts/ds_DeploymentScript_Staff.sh new file mode 100644 index 0000000..c812fb4 --- /dev/null +++ b/System Configs/Configuration Scripts/ds_DeploymentScript_Staff.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +########################################################### +# Script Name: DS_DeploymentScript_Staff.sh +# By: Zack Thompson / Created: 5/14/2015 +# Version: 1.2 / Updated: 8/20/2015 / By: ZT +# +# Description: This script is used in Deployment Studio to configure new Macs. +# +########################################################### + +# Clear ARD Settings +Echo "Clearing ARD Settings..." +sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -uninstall -settings -prefs -configure -privs -none -computerinfo -set1 -1 "" -computerinfo -set2 -2 "" -computerinfo -set3 -3 "" -computerinfo -set4 -4 "" -clientopts -setreqperm -reqperm no -clientopts -setvnclegacy -vnclegacy no -restart -agent + +# Configure ARD Settings +Echo "Configuring ARD Settings..." +sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -privs -all -users ard_admin -allowAccessFor -specifiedUsers -clientopts -setdirlogins -dirlogins yes -setvnclegacy -vnclegacy yes -setvncpw -vncpw 'R3m0t3M3in!' -restart -agent + +# Add Domain Admins AD Group to local admin Group. +Echo "Adding Domain Admins AD Group to local admin Group..." +sudo dseditgroup -o edit -a "Domain Admins" -t group admin + +# Add Domain Users AD Group to local lpadmin Group -- this is the "Print Admin" group. +Echo "Adding Domain Users AD Group to local lpadmin Group..." +sudo dseditgroup -o edit -a "Domain Users" -t group lpadmin + +# Connect to currently logged in (console) user with VNC. +Echo "Setting VNC option to connect to currently logged in (console) user..." +sudo defaults write /Library/Preferences/com.apple.RemoteManagement VNCAlwaysStartOnConsole -bool true + +# Turn off DS_Store file creation on network volumes +Echo "Turnning off DS_Store file creation on network volumes..." +sudo defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true +sudo defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true + +# Disable default file sharing for guest +Echo "Disabling file sharing for guest..." +sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false + +# Disable iCloud & Apple Assistant Popup for new user creation +Echo "Disabling iCloud & Apple Assistant popup for new user creation..." +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion 10.10.99 +sudo mv /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher.backup +sudo defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.finder.plist ProhibitGoToiDisk -bool YES + +# Disable Time Machine's & pop-up message whenever an external drive is plugged in +Echo "Disabling Time Machine's pop-up message whenever an external drive is plugged in..." +sudo defaults write /System/Library/User\ Template/Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true +sudo defaults write /Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true +# sudo defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -boolean NO + +# Configure Munki Repo +Echo "Configuring Munki Repo..." +sudo defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "https://osxserver.domain.org/Munki_Repo" +sudo defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "Staff" +sudo defaults write /Library/Preferences/ManagedInstalls InstallAppleSoftwareUpdates -bool True +# sudo defaults write /Library/Preferences/ManagedInstalls SoftwareUpdateServerURL "" + +# Bootstrap Munki; creates file that the Munki deamon checks to see if it exits on start and if it does, will check the repo for software updates. +Echo "Bootstraping Munki..." +touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup + +Echo "Configuration Complete!" +exit 0 diff --git a/System Configs/Configuration Scripts/enroll_Existing.sh b/System Configs/Configuration Scripts/enroll_Existing.sh new file mode 100644 index 0000000..a6c2ae5 --- /dev/null +++ b/System Configs/Configuration Scripts/enroll_Existing.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +################################################################################################### +# Script Name: Enroll_Existing.sh +# By: Zack Thompson / Created: 5/20/2015 +# Version: 1.1 / Updated: 8/13/2015 / By: ZT +# +# Description: This script installs the MDM Profiles to enroll existing OS X devices. +# +################################################################################################### + +# Install the Trust Profile then the enrollment profile. +sudo /usr/bin/profiles -I -F /Library/IT_Staging/Trust_Profile_for_Organization.mobileconfig +sudo /usr/bin/profiles -I -F /Library/IT_Staging/Organization_Enrollment_Profile.mobileconfig + +# Delete all staging files. +rm /Library/IT_Staging/* + +# Call Deployment Script +./Enroll_Staff.sh + +exit 0 \ No newline at end of file