Commit 39662169 authored by Peter NORTHUP's avatar Peter NORTHUP

Clearer instructions, sets login to name and password instead of list

parent cd500787
#!/bin/sh
# Set up a fresh Macbook for IST. Run as root user or with sudo
# 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 administrator account, with sudo? If not, cancel now..."
function enter_yesno {
while true ; do
......@@ -25,7 +26,7 @@ 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. 'i21.eg' for Office West Ground Floor: " printer
# read -p "Enter the building and floor, for default printer selection, if any. E.g. 'i21.eg' for Office West Ground Floor: " printer
# change computer name
scutil --set HostName $hostname
......@@ -40,6 +41,8 @@ softwareupdate --install --all
# join to domain
dsconfigad -add IST.LOCAL -computer "`hostname -s`" -mobile enable -sharepoint disable -mobileconfirm disable -username $admuser -ou "OU=MacClients,OU=_IST_AUSTRIA,DC=ist,DC=local"
# set to fullname / password login window
defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool TRUE
# enable SSH
systemsetup -setremotelogin on
......@@ -50,7 +53,7 @@ systemsetup -setremotelogin on
dsconfigad -groups "Domain Admins"
# add user to admin
echo "When it asks for 'user password', give the root password.\n"
echo "When it asks for 'user password', give the password of the account you are using now to run the script.\n"
dseditgroup -o edit -n /Local/Default -u `whoami` -p -a "IST\\$username" -t user admin
# set scripts as executable
......
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