<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Path Security &#187; Downloads</title>
	<atom:link href="http://www.pathsecurity.com/category/downloads/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathsecurity.com</link>
	<description>Security is a Journey, not a destination.</description>
	<lastBuildDate>Fri, 18 Jun 2010 21:43:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>Copyright &#xA9; 2010 Path Security </copyright>
		<managingEditor>Webmaster@pathsecurity.com ()</managingEditor>
		<webMaster>Webmaster@pathsecurity.com ()</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Security is a Journey, not a destination.</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>Webmaster@pathsecurity.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.pathsecurity.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.pathsecurity.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Path Security</title>
			<link>http://www.pathsecurity.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Mac PreStage Script</title>
		<link>http://www.pathsecurity.com/2009/05/mac-prestage-script/</link>
		<comments>http://www.pathsecurity.com/2009/05/mac-prestage-script/#comments</comments>
		<pubDate>Wed, 27 May 2009 05:21:25 +0000</pubDate>
		<dc:creator>Richard E. Baker</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.pathsecurity.com/?p=133</guid>
		<description><![CDATA[I wrote this script for the the Mac OS to simplify the prestageing for a OS 10.5 deployment. I just hope parts of it can be useful to others&#8230; Its written as a basic shell script but for ease of coding in places it calls to Applescript.  If you have any edits, ideas, or questions [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this script for the the Mac OS to simplify the prestageing for a OS 10.5 deployment. I just hope parts of it can be useful to others&#8230; Its written as a basic shell script but for ease of coding in places it calls to Applescript.  If you have any edits, ideas, or questions please post them in the comments.</p>
<p><span id="more-133"></span></p>
<blockquote><p> </p>
<p>#!/bin/sh<br />
####################################################<br />
# Pre-Stage Script.<br />
# Written by Richard Baker on 08/12/08<br />
# <br />
#<br />
# To add Installers Reference Section 9<br />
#   Packages use &#8211; installer -pkg [./path/file] -target /<br />
#   External scripts &#8211; sudo [./path/file]<br />
#<br />
# Installers are run in order.<br />
# <br />
#<br />
#############################################################<br />
#</p>
<p>#<br />
#############################################################<br />
# Section 1. Menu Screen<br />
#############################################################<br />
#<br />
clear</p>
<p>echo &#8220;Welcome to the ODIN Q39 Installation script.&#8221;<br />
echo &#8220;&#8221;<br />
echo &#8220;This script will:&#8221;<br />
echo &#8221; &#8211; Set the computer name&#8221;<br />
echo &#8221; &#8211; Configure Network settings&#8221;<br />
echo &#8221; &#8211; Enable Remote Login (SSH)&#8221;<br />
echo &#8221; &#8211; Enable Screen Saver/Sleep Password&#8221;<br />
echo &#8221; &#8211; Enable Secure Virtual Memory (will require admin password)&#8221;<br />
echo &#8221; &#8211; Enable Require Password for System Preferences&#8221;<br />
echo &#8221; &#8211; Optional VPN Install&#8221;<br />
echo &#8221; &#8211; Install and configure Tivoli&#8221;<br />
echo &#8221; &#8211; Install ARC software payload&#8221;<br />
echo &#8221; &#8211; Begin Apple Software Update (will run 2 passes)&#8221;<br />
echo &#8221; &#8211; Display HW MAC address&#8221;<br />
read -p &#8216;Do you want to continue? [y=yes] : &#8216; inputstart</p>
<p>if [[ $inputstart != "y" ]]<br />
then<br />
  exit 0<br />
fi</p>
<p>#<br />
#############################################################<br />
# Section 2. Set ECN variable<br />
#############################################################<br />
#</p>
<p>clear<br />
read -p &#8216;Please Input the correct ECN and press enter  : &#8216; inputecn</p>
<p>#<br />
#############################################################<br />
# Section 3. Set Backup Server Options (This Section moved to installer calls)<br />
#############################################################<br />
#</p>
<p>#<br />
#############################################################<br />
# Section 4. Set Network variables<br />
#############################################################<br />
#</p>
<p>read -p &#8216;Please Input Network Information [IP Address] : &#8216; inputtcp<br />
read -p &#8216;                                [Subnet Mask] : &#8216; inputsubnet<br />
read -p &#8216;                                    [Gateway] : &#8216; inputgateway<br />
echo &#8220;&#8221;<br />
echo &#8220;Installing Optional Software&#8221;<br />
echo &#8220;&#8221;<br />
read -p &#8216;Would you like to Install Cisco VPN   [y=yes] : &#8216; inputcisco</p>
<p>#<br />
#############################################################<br />
# End Variable enty.  Below is running code.<br />
#############################################################<br />
#</p>
<p>#<br />
#############################################################<br />
#</p>
<p>#<br />
#############################################################<br />
# Setting Time Zone<br />
#############################################################<br />
#</p>
<p>echo &#8220;Setting Time Zone.&#8221;<br />
sudo systemsetup -settimezone America/Los_Angeles</p>
<p>#<br />
#############################################################<br />
# Setting IP Address<br />
#############################################################<br />
#</p>
<p>echo &#8220;Setting IP address&#8221;<br />
/usr/sbin/networksetup -setmanual &#8220;Built-In Ethernet&#8221; $inputtcp $inputsubnet $inputgateway</p>
<p>echo &#8220;Setting DNS server&#8221;<br />
/usr/sbin/networksetup -setdnsservers &#8220;Built-In Ethernet&#8221; XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX</p>
<p>echo &#8220;Setting search domains&#8221;<br />
/usr/sbin/networksetup -setsearchdomains &#8220;Built-In Ethernet&#8221; foo.bar.com</p>
<p>#<br />
#############################################################<br />
# Bind to Open Directory (For Future Use)<br />
#############################################################<br />
#</p>
<p>##(<br />
### Edit this line to Correct server<br />
##odmaster=&#8221;stfumac.foo.bar.com&#8221;<br />
##<br />
##/usr/sbin/dsconfigldap -a $odmaster<br />
##/usr/bin/dscl localhost -create /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath<br />
##/usr/bin/dscl localhost -merge /Search CSPSSearchPath /LDAPv3/$odmaster<br />
##/usr/bin/dscl localhost -create /Contact SearchPolicy dsAttrTypeStandard:CSPSSearchPath<br />
##/usr/bin/dscl localhost -merge /Contact CSPSSearchPath /LDAPv3/$odmaster<br />
##)</p>
<p>#<br />
#############################################################<br />
# Bind To Active Directory (For Future Use)<br />
#############################################################<br />
#</p>
<p>### Please Make sure System name is less than 15 caracters.<br />
##(<br />
### Edit below line for AD server<br />
##adserver=&#8221;foo.bar.com&#8221;<br />
##<br />
##/usr/sbin/dsconfigad -f -a odin$inputecn -domain Foo.bar.com -ou FooMAC<br />
##)</p>
<p>#<br />
#############################################################<br />
# Change Update server (For Future Use)<br />
#############################################################<br />
#</p>
<p>## Writes system wide for GUI tool<br />
#sudo defualts write /Library/Preferences/com.apple.SoftwareUpdate &lt;URL&gt;<br />
## Writes pref root user, &#8217;softwareupdate&#8217; will access specified<br />
#sudo defualts write com.apple.SoftwareUpdate &lt;URL&gt;</p>
<p>#<br />
#############################################################<br />
# Enable System preferences<br />
#############################################################<br />
#</p>
<p>echo &#8220;Setting Remote Login&#8221;<br />
systemsetup -setremotelogin on<br />
echo &#8220;Setting Screensaver Timer.&#8221;<br />
defaults -currentHost write com.apple.screensaver idleTime 900<br />
echo &#8220;Disabling Automatic Software Updates.&#8221;<br />
sudo software &#8211;schedule off<br />
echo &#8220;Killing Time Machine NagScreen&#8221;<br />
defualts write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool YES<br />
echo &#8220;Applying Security settings.&#8221;<br />
#Below is a Shell run applescript please do not modify<br />
(<br />
sudo touch /private/var/db/.AccessibilityAPIEnabled<br />
exec osascript <<\EOF<br />
tell application "System Events"<br />
 tell security preferences<br />
  get properties<br />
   --> returns: {require password to wake:false, class:security preferences object, secure virtual memory:false, require password to unlock:false, automatic login:false, log out when inactive:false, log out when inactive interval:60}</p>
<p> set properties to {require password to wake:true, secure virtual memory:true, require password to unlock:true, automatic login:false, log out when inactive:false, log out when inactive interval:60}</p>
<p> end tell<br />
end tell<br />
EOF<br />
)</p>
<p>#<br />
#############################################################<br />
# Toggle Bluetooth sharing<br />
#############################################################<br />
#<br />
echo &#8220;Disabling Blutooth Sharing.&#8221;<br />
(<br />
exec osascript <<\EOF<br />
tell application "System Preferences" to set current pane to pane "com.apple.preferences.sharing"<br />
tell application "System Events" to tell process "System Preferences"<br />
  click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1 of window "Sharing"<br />
  delay 1<br />
  if (exists sheet 1 of window "Sharing") then<br />
  click button "Start" of sheet 1 of window "Sharing"<br />
  end if<br />
end tell</p>
<p>ignoring application responses<br />
tell application "System Preferences" to quit<br />
end ignoring<br />
EOF<br />
)</p>
<p>#<br />
#############################################################<br />
# Setting Hot Corners<br />
#############################################################<br />
#</p>
<p>echo "Clearing Hot Corners."<br />
(<br />
exec osascript <<\EOF<br />
tell application "System Events"<br />
 tell expose preferences<br />
  ##SCREEN CORNERS (top right screen corner, bottom left screen corner, bottom right screen corner, top right screen corner)<br />
  ##get the properties of the top right screen corner ---&gt; returns: {activity:none, class:screen corner, modifiers:{command}}<br />
  set properties of the top right screen corner to {activity:none, modifiers:{command}}<br />
  set properties of the top left screen corner to {activity:none, modifiers:{command}}<br />
  set properties of the bottom right screen corner to {activity:none, modifiers:{command}}<br />
  set properties of the bottom left screen corner to {activity:none, modifiers:{command}}<br />
 end tell<br />
end tell</p>
<p>EOF<br />
)</p>
<p>#<br />
#############################################################<br />
# Setting Computer Name<br />
#############################################################<br />
#</p>
<p>echo "Setting computer name"<br />
/bin/hostname $inputecn<br />
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/systemsetup -setcomputername  $inputecn<br />
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup -setcomputername $inputecn<br />
scutil --set ComputerName $inputecn<br />
scutil --set HostName $inputecn<br />
scutil --set LocalHostName $inputecn</p>
<p>#<br />
#############################################################<br />
# Call to Backup script.<br />
#############################################################<br />
#</p>
<p>sudo ./Installers/XXbackupsoftwareXX/InstallScript.sh</p>
<p>#<br />
#############################################################<br />
# Optional Package Installs<br />
#############################################################<br />
#</p>
<p>if [[ $inputcisco = "y" ]]<br />
then<br />
    installer -pkg ./Installers/Cisco/"Cisco VPN Client.mpkg" -target /<br />
    cp ./Installers/Cisco/Profiles/ACME.pcf /etc/opt/cisco-vpnclient/Profiles/ACME.pcf</p>
<p>fi</p>
<p>#<br />
#############################################################<br />
# Package Installers<br />
#############################################################<br />
#</p>
<p>## See Top of script for formating additional installers </p>
<p>#<br />
#############################################################<br />
# Starting Software Update (two passes)<br />
#############################################################<br />
#</p>
<p>clear<br />
echo "Starting Software Update"<br />
echo ""<br />
echo "First Pass"<br />
echo ""<br />
sudo softwareupdate -l -d -i -a<br />
echo ""<br />
echo ""<br />
echo "Second Pass"<br />
sudo softwareupdate -l -d -i -a<br />
 <br />
#<br />
#############################################################<br />
# Post install Information<br />
#############################################################<br />
#</p>
<p>clear<br />
echo "This"<br />
echo "Pre-Stage"<br />
echo "is"<br />
echo "FINISHED"</p>
<p>say "This System is ready to deploy"<br />
echo ""<br />
echo ""<br />
echo "Remember to write down the HW MAC address."<br />
ifconfig en0 | grep ether<br />
echo ""<br />
echo ""<br />
echo ""<br />
read -p 'Would you like to restart the system? [y=yes] ' inputrestart<br />
if [[ $inputrestart != "y" ]]<br />
then<br />
 exit 0<br />
fi<br />
shutdown -r now</p>
<div></div>
<p> </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.pathsecurity.com/2009/05/mac-prestage-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
