Commit add3a2a1 authored by 's avatar

Breaking into Admin and User scripts.

parent 39662169
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
# Set up a fresh Macbook for IST. Run with sudo!
# run from /Users/Shared/mac-scripts
# note: slow login may be helped by putting IPs of domain controllers: DC1, W1521003, W1521007
echo "Are you running this from the future user's account? If not, cancel now..."
function enter_yesno {
while true ; do
echo -n "${1} (Y/N)? " 1>&2
read -n 1 reply
case "$reply" in
Y*|y*) return 0 ;;
N*|n*) return 1 ;;
echo "Invalid input, try again ..." 1>&2
# hostname = "USER INPUT"
read -p "Enter hostname (e.g. 'mnadmn001'): " hostname
# username = "USER INPUT"
read -p "Enter future username: " username
# admuser = "USER INPUT"
read -p "Enter your AD admin username: " admuser
# admgroup = "USER INPUT"
read -p "Enter an AD group that should have admin access, if any (besides Domain Admins) - e.g. 'itgrp': " admgroup
# printer = "USER INPUT"
# read -p "Enter the building and floor, for default printer selection, if any. E.g. '' for Office West Ground Floor: " printer
# set scripts as executable
chmod 755 com.user.loginscript.plist
# root needs to own all-user LaunchAgents
chown root com.user.loginscript.plist
# loginscript.plist runs for all users on login
cp com.user.loginscript.plist /Library/LaunchAgents/com.user.loginscript.plist
# download, install browser certificates / istwlan cert
curl -O
curl -O
security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain IST-Austria-Root-CA01.crt
security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain IST.CA.CRT.pem
rm IST.CA.CRT.pem
rm IST-Austria-Root-CA01.crt
# download, install OCS
# waiting on Thomas to update this
# download, install Tunnelblick - install config files?
curl -O
unzip > /dev/null
mv /Applications
# download, install SeaFile
curl -O
unzip > /dev/null
mv Seafile\ /Applications
# download, install MacPass
curl -O
unzip > /dev/null
mv /Applications
# download printers, install
# when domain-joined adding printers is easy
if enter_yesno "Install printers?"
if enter_yesno "Install common programs?"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment