I'm new to OSX imaging/scripting, and have about 100 iMACs to create an image for and deploy. I'm having enough of a hard time tring to understand DMG/PKG file deployments, as it doesn't seem that there is any easy tutorial out there to follow. One of the 2 big requirements we need is an auto-naming tool such as WSNAME (or a way for it to prompt us prior to joining our domain). We are also looking for a join domain script where I can just fill in our OU and server info. 

Any help is appreciated!

 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

here is one of the scripts we use to join domain as a post install task with the k2000

#!/bin/bash

### You must edit these for your specific CLASSROOM

# 1) fully qualified DNS name of Active Directory Domain.
domain="tmccacad.tmcc.edu"

# 2) username of a privileged network user.
udn="macjoiner"

# 3) password of a privileged network user.
password="XXXXXXXXXX"

# 4) Distinguished name of container for the computer
ou="cn=ATC-206,ou=MACs,ou=dandini,ou=campuses,dc=tmccacad,dc=tmcc,dc=edu"

# 5) 'enable' or 'disable' automatic multi-domain authentication
alldomains="disable"

### End of configuration

# Get the local computer's name.
computerid=`/usr/sbin/scutil --get LocalHostName`

# Activate the AD plugin, just to be sure
defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" "Active"
plutil -convert xml1 /Library/Preferences/DirectoryService/DirectoryService.plist

# Bind to AD
dsconfigad -f -a $computerid -domain $domain -u "$udn" -p "$password" -ou "$ou"
dsconfigad -alldomains $alldomains

# Add the AD node to the search path
if [ "$alldomains" = "enable" ]; then
    csp="/Active Directory/All Domains"
else
    csp="/Active Directory/$domain"
fi

dscl /Search -append / CSPSearchPath "$csp"
dscl /Search -create / SearchPolicy dsAttrTypeStandard:CSPSearchPath
dscl /Search/Contacts -append / CSPSearchPath "$csp"
dscl /Search/Contacts -create / SearchPolicy dsAttrTypeStandard:CSPSearchPath

# Restart Directory Service
killall DirectoryService
sleep 2

exit 0

 

Answered 04/12/2013 by: SMal.tmcc
Red Belt

  • Thanks - I will try that. I'm also dumbfounded why post install tasks don't work. I have the KACE agent and Firefox set to deploy...yet neither install.


    KBOX post install command:
    KACE_SERVER=k2000.cusd200.org installer -pkg AMPAgent.pkg -target /

    Firefox post install command:
    ditto -rsrc Firefox.app /Applications/Firefox
Please log in to comment

Answers

1

Hi,

 

You may want to look at http://www.deploystudio.com/Home.html we used it for large scale mac deployments (We don't have k2000 :-(  for deployments. For sysprep replacement there isn't one, but the deploy studio will walk you through on setups for the machines and different workflows (configurations) that can be applied to the machines.

Answered 04/12/2013 by: ms01ak
Tenth Degree Black Belt

Please log in to comment
1

I'm using this script to change the machine new below. Is there a way to generate the name to be unique (serial # or something like "Apple Lab 1" "Apple Lab 2", etc?)

 

 #!/bin/bash

HOSTNAME='example'

/usr/sbin/scutil --set ComputerName "${HOSTNAME}"
/usr/sbin/scutil --set LocalHostName "${HOSTNAME}"

exit 0
Answered 04/12/2013 by: sfigg
Red Belt

  • Hi
    Have you found a Computer naming script that auto nanes your computers befor you add them to AD
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share