/build/static/layout/Breadcrumb_cap_w.png

OSX Noob - Alternative to WSNAME, and a join domain script?

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

Answers (3)

Posted by: SMal.tmcc 11 years ago
Red Belt
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

 


Comments:
  • 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 - sfigg 11 years ago
Posted by: ms01ak 11 years ago
10th Degree Black Belt
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.

Posted by: sfigg 11 years ago
Red Belt
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

Comments:
  • Hi
    Have you found a Computer naming script that auto nanes your computers befor you add them to AD - Raoul.tjin 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ