Commit 33000949 authored by testing testuser's avatar testing testuser

Initial Macbook setup script. Joins to AD.

parents
#!/bin/sh
# Set up a fresh Macbook for IST. Run with sudo
# 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. 'u21.eg'" printer
# change computer name
scutil --set HostName $hostname
# install xcode command line tools
xcode-select --install
# update everything
softwareupdate --install --all
# join to domain
dsconfigad -add IST.LOCAL -computer "`hostname -s`" -mobile enable -mobileconfirm disable -username $admuser -ou "OU=MacClients,OU=_IST_AUSTRIA,DC=ist,DC=local"
# enable SSH
systemsetup -setremotelogin on
# dsconfigad -remove IST.LOCAL -computer "`hostname -s`" -username $admuser
# add domain admins to admin
dsconfigad -groups "IST.LOCAL\Domain Admins"
# add user to admin
dseditgroup -o edit -n /Local/Default -u $admuser -p -a $username -t user admin
# download fileshare script, set to run on logon
# download printers, install
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