<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Mac Admin Corner</title>
	
	<link>http://macadmincorner.com</link>
	<description>General IT and Mac administration ramblings</description>
	<lastBuildDate>Sat, 28 Jan 2012 01:45:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MacAdminCorner" /><feedburner:info uri="macadmincorner" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>34.228478</geo:lat><geo:long>-84.504025</geo:long><feedburner:emailServiceId>MacAdminCorner</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Resources from the PSU MacAdmins Conference</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/Tha9EY1bE2g/</link>
		<comments>http://macadmincorner.com/resources-from-the-psu-macadmins-conference/#comments</comments>
		<pubDate>Thu, 12 May 2011 23:26:15 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=516</guid>
		<description><![CDATA[If you weren&#8217;t fortunate enough to attend the PSU MacAdmins conference (I wasn&#8217;t either), you can still get a lot out of it. They have posted session slides and other resources here. Rumor has it video will be posted in a couple weeks too. Many thanks to the folks at <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/resources-from-the-psu-macadmins-conference/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>If you weren&#8217;t fortunate enough to attend the PSU MacAdmins conference (I wasn&#8217;t either), you can still get a lot out of it. They have posted session slides and other resources <a href="http://macadmins.psu.edu/conference/resources">here</a>. Rumor has it video will be posted in a couple weeks too. Many thanks to the folks at Penn State for sharing. I hope to attend next year.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/aNhY0jyqvjuMX2BMwPK8FlRNm9A/0/da"><img src="http://feedads.g.doubleclick.net/~a/aNhY0jyqvjuMX2BMwPK8FlRNm9A/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/aNhY0jyqvjuMX2BMwPK8FlRNm9A/1/da"><img src="http://feedads.g.doubleclick.net/~a/aNhY0jyqvjuMX2BMwPK8FlRNm9A/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Tha9EY1bE2g:_QBHKhb6Ttg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Tha9EY1bE2g:_QBHKhb6Ttg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=Tha9EY1bE2g:_QBHKhb6Ttg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Tha9EY1bE2g:_QBHKhb6Ttg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=Tha9EY1bE2g:_QBHKhb6Ttg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Tha9EY1bE2g:_QBHKhb6Ttg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/Tha9EY1bE2g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/resources-from-the-psu-macadmins-conference/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/resources-from-the-psu-macadmins-conference/</feedburner:origLink></item>
		<item>
		<title>3 Ways to Netboot Across Subnets</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/Ng3PlHcpXVw/</link>
		<comments>http://macadmincorner.com/3-ways-to-netboot-across-subnets/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 02:50:09 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Absolute Manage]]></category>
		<category><![CDATA[Imaging]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Applescript]]></category>
		<category><![CDATA[Desktop Management]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[NetBoot]]></category>
		<category><![CDATA[NetBoot Across Subnets]]></category>
		<category><![CDATA[NetRestore]]></category>
		<category><![CDATA[Packaging]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=499</guid>
		<description><![CDATA[There is a proper way a network should be configured in order to allow your machines to netboot from a server located on a different subnet. Instructions for doing so can be found on AFP548.com. If however, you are not able to make the needed changes to your network hardware, <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/3-ways-to-netboot-across-subnets/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>There is a proper way a network should be configured in order to allow your machines to netboot from a server located on a different subnet. Instructions for doing so can be found on <a title="How to NetBoot Across Subnets" href="http://www.afp548.com/netboot/mactips/nbas.html" target="_blank">AFP548.com</a>. If however, you are not able to make the needed changes to your network hardware, you will need to set the startup disk to boot from a netboot image. This post will explain some different ways to do this. You can also use these methods if your server IS on the same subnet. <span id="more-499"></span></p>
<p><a href="http://bombich.com/" target="_blank">Mike Bombich</a> used to make a product called &#8220;NetBoot Across Subnets&#8221; but he stopped developing it long ago (Mac OS X 10.4 era). The product still works somewhat, but PPC booting broke when Leopard came out. I <a href="http://blog.macadmincorner.com/ppc-not-booting-from-netboot-across-subnets-package/" target="_blank">posted a fix</a> a couple years ago. These instructions can be used for imaging via Deploy Studio, NetInstall/NetRestore and likely some other methods.</p>
<p>There are three different ways I use to configure a machine to netboot:</p>
<ol>
<li>Push NBAS.pkg</li>
<li>Run shell script</li>
<li>Applescript</li>
</ol>
<h3>Push a Package</h3>
<p>The first method is by pushing the package that Bombich&#8217;s &#8220;NetBoot Across Subnets&#8221; outputs. I&#8217;m not sure where you can download the software from anymore and I don&#8217;t think I should distribute it. However, I don&#8217;t actually use the app anymore. I just modify the postflight file in my NBAS.pkg whenever I generate a new netboot image.</p>
<p><a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-24-at-8.52.02-PM.png"><img class="alignleft size-thumbnail wp-image-500" title="NBAS.pkg" src="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-24-at-8.52.02-PM-150x150.png" alt="Netboot Across Subnets package" width="128" height="128" /></a>You can download a <a href="http://macadmincorner.com/blog/files/NBAS.pkg.zip" target="_self">NBAS.pkg here</a>.</p>
<p>Right click the package and select &#8220;Show Package Contents&#8221;.<br />
Navigate to Contents/Resources/ and open the <strong>postflight</strong> file in a text editor such as TextEdit or TextWrangler (do not open in Word!).</p>
<p>Change the variables at the top of the script and save the file.</p>
<p>You can then deploy via Apple Remote Desktop (ARD) or add it to your systems management tool such as Absolute Manage or Casper.</p>
<p>So when ever you create a new netboot set, simply modify that postflight file. This can also be installed locally. If needed, boot from an external HDD if you need to image a machine that doesn&#8217;t have a bootable system. Keep in mind, it does not matter which drive you &#8220;install onto&#8221; as this is a payload free package and nothing actually gets installed.</p>
<h3>Shell Script</h3>
<p>The second method is to simply push a script to your machine(s) to set the startup disk. The easiest way to do this is to take the postflight script from NBAS.pkg. I would just add a &#8220;reboot&#8221; command to the end of the script or use another method to reboot.<a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-24-at-9.09.32-PM.png"><img class="size-full wp-image-501 alignright" title="Terminal.app" src="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-24-at-9.09.32-PM.png" alt="" width="109" height="110" /></a></p>
<p>If you use Absolute Manage, you can save this as an Execute Script template and add it to your favorites. This way you any script errors that may result in the command result window. I&#8217;m sure you can do the same in other systems.</p>
<h3>Applescript</h3>
<p>You can also make an applescript available to your team to run locally on a machine to netboot it. This might be a bit easier for junior desktop support techs as they won&#8217;t get confused about which drive to &#8220;install onto&#8221;.  <img src='http://macadmincorner.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You can download the script from <a href="http://macadmincorner.com/blog/files/SetNetBootAcrossSubnets.scpt.zip">here</a>. Or copy &amp; paste from the script below:</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">(*
&nbsp;
Set NetBoot Across Subnets.scpt
© 2011 Patrick Gallagher
http://blog.macadmincorner.com
&nbsp;
This script may be freely modified.
Use at your own risk, no warranty. 	
&nbsp;
Based on NBAS from Mike Bombich
&nbsp;
*)</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- Set the following options</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">set</span> server <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;server.school.edu&quot;</span> <span style="color: #808080; font-style: italic;">--Enter IP or FQDN of netboot server</span>
<span style="color: #ff0033; font-weight: bold;">set</span> sharepoint <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;NetBootSP0&quot;</span> <span style="color: #808080; font-style: italic;">--In most cases this will not need to change</span>
<span style="color: #ff0033; font-weight: bold;">set</span> setName <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;DeployStudioRuntime-Intel.nbi&quot;</span> <span style="color: #808080; font-style: italic;">--Enter your Intel compatible netboot set name</span>
<span style="color: #ff0033; font-weight: bold;">set</span> ppcSetName <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;DeployStudioRuntime-PPC.nbi&quot;</span> <span style="color: #808080; font-style: italic;">--Enter your PPC netboot set name, if you have one</span>
<span style="color: #ff0033; font-weight: bold;">set</span> imageName <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;DeployStudioRuntime.sparseimage&quot;</span> <span style="color: #808080; font-style: italic;">--Enter image name, if using DeployStudio, no need to change</span>
<span style="color: #ff0033; font-weight: bold;">set</span> protocol <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;nfs&quot;</span> <span style="color: #808080; font-style: italic;">--Enter nfs or http</span>
<span style="color: #ff0033; font-weight: bold;">set</span> nextboot <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;--nextonly&quot;</span>
<span style="color: #ff0033; font-weight: bold;">set</span> arch <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;arch&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--No modification should be needed below</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">if</span> arch <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #ff0033;">equal</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;i386&quot;</span> <span style="color: #ff0033; font-weight: bold;">then</span>
	<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;usr/sbin/bless --netboot --booter tftp://&quot;</span> <span style="color: #000000;">&amp;</span>amp; server <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/NetBoot/&quot;</span> <span style="color: #000000;">&amp;</span>amp; sharepoint <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/&quot;</span> <span style="color: #000000;">&amp;</span>amp; setName <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/i386/booter --kernel tftp://&quot;</span> <span style="color: #000000;">&amp;</span>amp; server <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/NetBoot/&quot;</span> <span style="color: #000000;">&amp;</span>amp; sharepoint <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/&quot;</span> <span style="color: #000000;">&amp;</span>amp; setName <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/i386/mach.macosx --options rp=nfs:&quot;</span> <span style="color: #000000;">&amp;</span>amp; server <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;:/private/tftpboot/NetBoot/&quot;</span> <span style="color: #000000;">&amp;</span>amp; sharepoint <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;:&quot;</span> <span style="color: #000000;">&amp;</span>amp; setName <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/&quot;</span> <span style="color: #000000;">&amp;</span>amp; imageName <span style="color: #000000;">&amp;</span>amp; <span style="color: #0066ff;">space</span> <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;--nextonly&quot;</span> <span style="color: #ff0033; font-weight: bold;">with</span> administrator privileges
&nbsp;
<span style="color: #ff0033; font-weight: bold;">else</span>
	<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;/usr/sbin/nvram boot-args=rp=&quot;</span> <span style="color: #000000;">&amp;</span>amp; protocol <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;:&quot;</span> <span style="color: #000000;">&amp;</span>amp; server <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;:/private/tftpboot/NetBoot/&quot;</span> <span style="color: #000000;">&amp;</span>amp; sharepoint <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;:&quot;</span> <span style="color: #000000;">&amp;</span>amp; ppcSetName <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;/&quot;</span> <span style="color: #000000;">&amp;</span>amp; imageName <span style="color: #000000;">&amp;</span>amp; <span style="color: #0066ff;">space</span> <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;boot-file=enet:&quot;</span> <span style="color: #000000;">&amp;</span>amp; server <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;,NetBoot<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>&quot;</span> <span style="color: #000000;">&amp;</span>amp; sharepoint <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>&quot;</span> <span style="color: #000000;">&amp;</span>amp; ppcSetName <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>ppc<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>mach.macosx<span style="color: #000000; font-weight: bold;">\&quot;</span> boot-device=enet:&quot;</span> <span style="color: #000000;">&amp;</span>amp; server <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;,NetBoot<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>&quot;</span> <span style="color: #000000;">&amp;</span>amp; sharepoint <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>&quot;</span> <span style="color: #000000;">&amp;</span>amp; ppcSetName <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>ppc<span style="color: #000000; font-weight: bold;">\\</span><span style="color: #000000; font-weight: bold;">\\</span>booter<span style="color: #000000; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #ff0033; font-weight: bold;">with</span> administrator privileges
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;loginwindow&quot;</span>
	«event aevtrrst»
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></div></div>

<h3>Summary</h3>
<p>Do what you can to convince your network group to modify your network so you can netboot across subnets the way it it&#8217;s supposed to work. If not, I hope these methods above ease the pain. These are three ways to do the same thing!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/6UNevat7eWigkwwoJKX61eKZwBg/0/da"><img src="http://feedads.g.doubleclick.net/~a/6UNevat7eWigkwwoJKX61eKZwBg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/6UNevat7eWigkwwoJKX61eKZwBg/1/da"><img src="http://feedads.g.doubleclick.net/~a/6UNevat7eWigkwwoJKX61eKZwBg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Ng3PlHcpXVw:xX8527tUnQI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Ng3PlHcpXVw:xX8527tUnQI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=Ng3PlHcpXVw:xX8527tUnQI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Ng3PlHcpXVw:xX8527tUnQI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=Ng3PlHcpXVw:xX8527tUnQI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=Ng3PlHcpXVw:xX8527tUnQI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/Ng3PlHcpXVw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/3-ways-to-netboot-across-subnets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/3-ways-to-netboot-across-subnets/</feedburner:origLink></item>
		<item>
		<title>Absolute Manage – Adding Dell Warranty to Inventory</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/mq-tEm4JgAM/</link>
		<comments>http://macadmincorner.com/absolute-manage-adding-dell-warranty-to-inventory/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 19:41:39 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Absolute Manage]]></category>
		<category><![CDATA[Desktop Management]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Warranty]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=476</guid>
		<description><![CDATA[Update: As of Absolute Manage 6.0, this is no longer needed. AM 6 now includes this functionality. Having warranty information on the machines you manage is important to have as part of your PC life-cycle management. It makes it easier to plan future PC replacements, assess risk and possibly know <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/absolute-manage-adding-dell-warranty-to-inventory/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>Update: </strong>As of Absolute Manage 6.0, this is no longer needed. AM 6 now includes this functionality.</p>
<p>Having warranty information on the machines you manage is important to have as part of your PC life-cycle management. It makes it easier to plan future PC replacements, assess risk and possibly know when to purchase another extension for warranties (unlike Apple, Dell has more flexible extended warranty options).Out of the box, <a href="http://absolute.com/en/products/absolute-manage/features.aspx" target="_blank">Absolute Manage</a> only gathers warranty data for Apple products. This is likely because of the vast number of PC manufacturers, and not all the major vendors provide a way to systematically retrieve warranty data (Dell and Apple do). To be fair, most other PC life-cycle management products don&#8217;t collect any warranty data. For example, to collect warranty data with LANDesk, you have to purchase an expensive 3rd party add-on called <a href="http://www.managedplanet.com/products_for_landesk/data-translation-services-for-landesk.html" target="_blank">Data Translations Services</a> from <a href="http://www.managedplanet.com" target="_blank">Managed Planet</a>. A couple years ago, I <a title="LANDesk – Adding Apple Warranty Data to Inventory" href="http://blog.macadmincorner.com/landesk-adding-apple-warranty-data-to-inventory/">posted</a> a way to add Apple warranty data to LANDesk. This Dell script could potentially be adapted to also work with LANDesk by using <a href="http://www.droppedpackets.org/technology/database/external-unmodeled-data/" target="_blank">external unmodeled data</a>.</p>
<p>A high level overview includes:</p>
<ol>
<li>Create a VBScript</li>
<li>Create and deploy script as a software package</li>
<li>Create &#8220;Custom Information Items&#8221; so results are added to inventory<span id="more-476"></span></li>
</ol>
<h3>Save The Script</h3>
<p>I knew I was going to be in over my head if I tried to write a VBScript or Power Shell script myself, so searched online for an existing one instead. I fully expected to have to modify someone&#8217;s existing script, but I lucked out and found one that worked with no modifications (other than adapting for Dell&#8217;s new fields which this site updated with my mods). The script I&#8217;m using can be found at <a title="Dell Warranty Information Script" href="http://iboyd.net/index.php/2010/06/17/dell-warranty-information-script/" target="_blank">here at iBoyd</a>.</p>
<p>Save the contents of that script to a text file and name it something like DellWarrantyGrabber.vbs.</p>
<h3>Create Software Package</h3>
<p>In Absolute Manage, create a new software package (I&#8217;m assuming you know how to do this already, if not, see the manual) and use your DellWarrantyGrabber.vbs as the payload. Make sure you set the platform as &#8220;Windows&#8221;, set the Installation User Context as &#8220;System account user&#8221; and you can also configure the &#8220;Installation Conditions&#8221; with the following settings:</p>
<p><a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-22-at-10.20.37-PM.png"><img class="aligncenter size-medium wp-image-477" title="Absolute Manage Installation Conditions" src="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-22-at-10.20.37-PM-300x204.png" alt="" width="300" height="204" /></a></p>
<p>The key name above is &#8220;HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\Days Left&#8221;. Save the package. Install the package to a couple PC&#8217;s and verify the results appear in the registry in &#8220;HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\&#8221;. The results should look something like:</p>
<p><a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-22-at-10.23.12-PM.png"><img class="aligncenter size-medium wp-image-479" title="Dell Warranty Information in Registry" src="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-22-at-10.23.12-PM-300x162.png" alt="" width="300" height="162" /></a></p>
<p>Once you are sure the package is working, you can assign it to the &#8220;All PC&#8217;s&#8221; group if you know you have all Dell&#8217;s (keep in mind the VM&#8217;s on your Macs are considered PC&#8217;s). Or create a smart group that only includes Dell&#8217;s and assign to that (probably safer).</p>
<h3>Custom Information Items</h3>
<p>CIF&#8217;s are an extremely handy way to add additional data to inventory. Data can either be manual (entered from the admin console) or dynamic (retrieved from each machine). There are 6 bits of information the script grabbed from Dell. You might not need to report on all 6. For instance, &#8220;Provider&#8221; and &#8220;Warranty Extension Notice&#8221; probably will not be of much use, but who knows. I used all 6 just for the sake of completeness.</p>
<p>NOTE: I&#8217;m assuming you know how to create a Custom Information Item. If not, see the manual. Or you can<a href="http://macadmincorner.com/files/Dell%20Custom%20Fields.lanrevcfdef.zip"> download these</a> I exported.</p>
<p>All 6 CIF&#8217;s will be identical, the only difference being the registry key being read. Below is an example of one:</p>
<p><a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-22-at-10.59.40-PM.png"><img class="aligncenter size-medium wp-image-483" title="Absolute Manage custom information item" src="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-22-at-10.59.40-PM-300x176.png" alt="Absolute Manage custom information item" width="300" height="176" /></a><br />
The 6 names (you can make the names anything you want) and registry paths you will enter into each CIF is:</p>
<p>Dell Warranty Days Left &#8211; HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\Days Left<br />
Dell Warranty Description &#8211; HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\Description<br />
Dell Warranty End Date &#8211; HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\End Date<br />
Dell Warranty Extension Notice &#8211; HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\Warranty Extension Notice<br />
Dell Warranty Provider &#8211; HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\Provider<br />
Dell Warranty Start Date &#8211; HKEY_LOCAL_MACHINE\SOFTWARE\DellWarrantyInfo\1\Start Date</p>
<p>You can duplicate the first one you make to save some clicks.</p>
<h4>A note about dates</h4>
<p>The &#8220;End Date&#8221; you would normally want to save with a &#8220;Data Type&#8221; of &#8220;Date&#8221; for the purpose of reporting. However, I was unable to get this to work. I reported it to Absolute&#8217;s support and they found that it is a bug that only occurs when running a DOS/VBScript with the Windows agent. They later also replied that the date has to be in ISO format for dynamic info items, e.g. 2010-12-30T05:25:13Z but I have not taken the time to modify the script to handle this. If you make the change, please share by commenting below.</p>
<h3>The Result</h3>
<p style="text-align: center;"><a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-23-at-12.05.58-AM.png"><img class="size-medium wp-image-486 aligncenter" title="Dell warranty report" src="http://blog.macadmincorner.com/wp-content/uploads/2011/01/Screen-shot-2011-01-23-at-12.05.58-AM-300x29.png" alt="" width="300" height="29" /></a></p>
<p>I hope you&#8217;re able to put this to some good use. Please let me know if anything is not clear. Enjoy!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/WYaCN4hEYQpKll5L9yXzAJ-Mtxs/0/da"><img src="http://feedads.g.doubleclick.net/~a/WYaCN4hEYQpKll5L9yXzAJ-Mtxs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/WYaCN4hEYQpKll5L9yXzAJ-Mtxs/1/da"><img src="http://feedads.g.doubleclick.net/~a/WYaCN4hEYQpKll5L9yXzAJ-Mtxs/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=mq-tEm4JgAM:Ueh6ozfdNVM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=mq-tEm4JgAM:Ueh6ozfdNVM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=mq-tEm4JgAM:Ueh6ozfdNVM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=mq-tEm4JgAM:Ueh6ozfdNVM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=mq-tEm4JgAM:Ueh6ozfdNVM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=mq-tEm4JgAM:Ueh6ozfdNVM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/mq-tEm4JgAM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/absolute-manage-adding-dell-warranty-to-inventory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/absolute-manage-adding-dell-warranty-to-inventory/</feedburner:origLink></item>
		<item>
		<title>Silent Install of IBM SPSS Statistics 19 for Mac</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/8_X5gSbQH4o/</link>
		<comments>http://macadmincorner.com/silent-install-of-ibm-spss-statistics-19-for-mac/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 01:38:03 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Absolute Manage]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Packaging]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[SPSS]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=455</guid>
		<description><![CDATA[A Little Background While there is documentation for doing a silent install of SPSS Statistics, the instructions for version 19 leave out some critical details. This post aims to clear up what needs to be done for a silent install of IBM&#8217;s SPSS Statistics 19. These instructions are for the <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/silent-install-of-ibm-spss-statistics-19-for-mac/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<h3>A Little Background</h3>
<p><a href="http://blog.macadmincorner.com/wp-content/uploads/2011/01/spss.gif"></a>While there is documentation for doing a silent install of SPSS Statistics, the instructions for version 19 leave out some critical details. This post aims to clear up what needs to be done for a silent install of IBM&#8217;s SPSS Statistics 19. These instructions are for the site or volume license version where a network license server is not being used (if you are using a network license server, you can simply repackage /Applications/IBM and /Library/Application Support/IBM). Each installed copy of SPSS has to be activated online, which means re-packaging is not an option.<span id="more-455"></span></p>
<p>Versions 17 and 18 did not install silently as documented and according to their KB article 83035, the only resolution was to wait for version 19 because of a problem with &#8220;InstallAnywhere&#8221;. Because of this, I never found a way to deploy versions 17 or 18.</p>
<h3>The Instructions</h3>
<p>The SPSS doc you want to refer to is the &#8220;Site License Administrators Guide&#8221; which is on the DVD. The instructions indicate you can find the silent installer at /MacOS/Administration/SPSS Statistics_Installer_Silent.bin, however you will find that this file is missing. I reported it to IBM/SPSS and they responded that they apparently didn&#8217;t have room on the disc (and didn&#8217;t bother telling anyone). So they posted the installer on their support site. You will need to register for an account at <a href="http://support.spss.com" target="_blank">http://support.spss.com</a> (I don&#8217;t remember if there were any requirements, I registered a while ago) and search their knowledge base for resolution number 91524 or go to this <a href="http://support.spss.com/Tech/Products/Statistics/Utilities/SPSSforMacOSX/index.html" target="_blank">link</a>.</p>
<p>Download the file SPSS Statistics_Installer_Silent.bin. This file contains the entire installer so you will not need the GUI installer that is on the disc. The only other file you will need from the disc is the <strong>installer.properties </strong>file. This is the file that contains all the properties used for the install (duh). You will need to make some changes to this file before it will work properly. This file is well commented, but it seems they didn&#8217;t update this file for version 19. It seems to have many of the defaults from previous versions (such as default application path doesn&#8217;t reflect the change to IBM).</p>
<p>You will want to specify the following settings in the installer.properties:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">INSTALLER_UI</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">silent</span>
&nbsp;
<span style="color: #000080; font-weight:bold;">USER_INSTALL_DIR</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/Applications/IBM/Statistics/19/</span>
&nbsp;
<span style="color: #000080; font-weight:bold;">LICENSE_ACCEPTED</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
&nbsp;
<span style="color: #808080; font-style: italic;">### LICENSETYPE</span>
<span style="color: #808080; font-style: italic;">#For site license</span>
<span style="color: #000080; font-weight:bold;">site</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">1</span>
&nbsp;
<span style="color: #000080; font-weight:bold;">COMPANYNAME</span><span style="color: #000000;">=</span><span style="color: #933;">&quot;Emory University&quot;</span>
<span style="color: #000080; font-weight:bold;">AUTHCODE</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">111222333444555</span></pre></div></div>

<p>This is just a small snippet of the file, I only posted the parts I needed to change. Obviously, you will want to specify your company/school name as well as your license code.</p>
<p>The command to deploy is simply:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SPSS_Statistics_Installer_Silent.bin <span style="color: #660033;">-f</span> installer.properties</pre></div></div>

<p>A couple things to note. Your deployment tool may interpret a successful install as an error because it doesn&#8217;t report back an &#8220;exit 0&#8243;. So you may have to run the command from a script, I use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">scriptDir</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">dirname</span> <span style="color: #ff0000;">&quot;$0&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #ff0000;">&quot;<span style="color: #007800;">${scriptDir}</span>/SPSS_Statistics_Installer_Silent.bin&quot;</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${scriptDir}</span>/installer.properties&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>Another issue is that because the license activation is machine specific, you will not be able to use this installer with <a href="http://code.google.com/p/instadmg/" target="_blank">InstaDMG</a> or include it with a monolithic image. If you deploy with <a href="http://deploystudio.com/Home.html" target="_blank">DeployStudio</a>, you will need to make it a first boot install and ensure the network is available when it is installed. We use <a href="http://absolute.com/en/products/absolute-manage/features.aspx" target="_blank">Absolute Manage</a> to deploy as needed.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/F0J1TBDmtEkTU7AC-U_RPPFeTH8/0/da"><img src="http://feedads.g.doubleclick.net/~a/F0J1TBDmtEkTU7AC-U_RPPFeTH8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/F0J1TBDmtEkTU7AC-U_RPPFeTH8/1/da"><img src="http://feedads.g.doubleclick.net/~a/F0J1TBDmtEkTU7AC-U_RPPFeTH8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=8_X5gSbQH4o:lSuIZwchb7E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=8_X5gSbQH4o:lSuIZwchb7E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=8_X5gSbQH4o:lSuIZwchb7E:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=8_X5gSbQH4o:lSuIZwchb7E:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=8_X5gSbQH4o:lSuIZwchb7E:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=8_X5gSbQH4o:lSuIZwchb7E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/8_X5gSbQH4o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/silent-install-of-ibm-spss-statistics-19-for-mac/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/silent-install-of-ibm-spss-statistics-19-for-mac/</feedburner:origLink></item>
		<item>
		<title>Adobe Acrobat X Provisioning Tool Released for Mac</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/PpaDOC5OX_o/</link>
		<comments>http://macadmincorner.com/adobe_acrobat_provisioning/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 21:39:47 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Packaging]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apple Remote Desktop]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=445</guid>
		<description><![CDATA[Adobe has released their Adobe Provisioning Tool for enterprise deployments and configurations of Acrobat X for Mac, as well as the Customization Wizard for Windows.  They provide a sample script in their Enterprise Administration Guide (PDF, pages 89-90) but it does not copy &#38; paste well, so you will <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/adobe_acrobat_provisioning/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>Adobe has released their <a href="http://kb2.adobe.com/cps/837/cpsid_83709.html" target="_blank">Adobe Provisioning Tool</a> for enterprise deployments and configurations of Acrobat X for Mac, as well as the Customization Wizard for Windows. <span id="more-445"></span></p>
<p>They provide a sample script in their <a href="http://kb2.adobe.com/cps/837/cpsid_83709/attachments/Acrobat_Enterprise_Administration.pdf" target="_blank">Enterprise Administration Guide</a> (PDF, pages 89-90) but it does not copy &amp; paste well, so you will have to pay special attention to the formatting and line breaks of your script.</p>
<p>Enjoy!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/lEyobzn-8ESmvbVIzlL85EJ1XtE/0/da"><img src="http://feedads.g.doubleclick.net/~a/lEyobzn-8ESmvbVIzlL85EJ1XtE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lEyobzn-8ESmvbVIzlL85EJ1XtE/1/da"><img src="http://feedads.g.doubleclick.net/~a/lEyobzn-8ESmvbVIzlL85EJ1XtE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=PpaDOC5OX_o:kUF55DYjslE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=PpaDOC5OX_o:kUF55DYjslE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=PpaDOC5OX_o:kUF55DYjslE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=PpaDOC5OX_o:kUF55DYjslE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=PpaDOC5OX_o:kUF55DYjslE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=PpaDOC5OX_o:kUF55DYjslE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/PpaDOC5OX_o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/adobe_acrobat_provisioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/adobe_acrobat_provisioning/</feedburner:origLink></item>
		<item>
		<title>Google releases MCX manifest for Chrome</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/51Nf1Ta7Fy0/</link>
		<comments>http://macadmincorner.com/google-releases-mcx-manifest-for-chrome/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 14:16:51 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Desktop Management]]></category>
		<category><![CDATA[Open Directory]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[MCX]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=432</guid>
		<description><![CDATA[Yesterday Google stepped up their effort to get Chrome accepted by enterprises by releasing details about managing Chrome with group policy and Open Directory.  The details about accessing the manifest can be found here. There are quite a few settings that can be managed with this manifest. However, I <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/google-releases-mcx-manifest-for-chrome/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>Yesterday Google stepped up their effort to get Chrome <a href="http://googleenterprise.blogspot.com/2010/12/chrome-is-ready-for-business.html">accepted by enterprises </a>by releasing details about managing Chrome with group policy and Open Directory.<a href="http://blog.macadmincorner.com/wp-content/uploads/2010/12/google.png"><br />
</a></p>
<p><span id="more-432"></span>The details about accessing the manifest can be found <a href="http://www.google.com/support/a/bin/answer.py?hl=en&amp;answer=187945" target="_blank">here</a>. There are quite a few settings that can be managed with this manifest. However, I was a bit surprised to find that all the settings are managed &#8220;Always&#8221; instead of &#8220;Often&#8221; or &#8220;Once&#8221;. Most 3rd party applications prefer often (including many Apple apps) because the always setting completely disables a configured setting. I hope to see some of these settings also available for &#8220;once&#8221;.</p>
<p><a href="http://blog.macadmincorner.com/wp-content/uploads/2010/12/Screen-shot-2010-12-15-at-8.00.15-PM.png"><img class="aligncenter size-full wp-image-434" title="Google Chrome MCX Settings" src="http://blog.macadmincorner.com/wp-content/uploads/2010/12/Screen-shot-2010-12-15-at-8.00.15-PM.png" alt="" width="418" height="519" /></a></p>
<p>With this move, this possibly makes Chrome more manageable than Firefox (not including non-vendor manifests/GPO&#8217;s), on Mac or PC. Will this be enough for you to start deploying Chrome in your environment? Sound off below.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/fOdxH3stLGlfwdtYuAuoUdtltOQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/fOdxH3stLGlfwdtYuAuoUdtltOQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fOdxH3stLGlfwdtYuAuoUdtltOQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/fOdxH3stLGlfwdtYuAuoUdtltOQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=51Nf1Ta7Fy0:yE-K7Y-58B4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=51Nf1Ta7Fy0:yE-K7Y-58B4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=51Nf1Ta7Fy0:yE-K7Y-58B4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=51Nf1Ta7Fy0:yE-K7Y-58B4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=51Nf1Ta7Fy0:yE-K7Y-58B4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=51Nf1Ta7Fy0:yE-K7Y-58B4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/51Nf1Ta7Fy0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/google-releases-mcx-manifest-for-chrome/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/google-releases-mcx-manifest-for-chrome/</feedburner:origLink></item>
		<item>
		<title>View Open Directory ComputerGroup Membership with Applescript</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/YxaWXoyPdQ4/</link>
		<comments>http://macadmincorner.com/view-open-directory-computergroup-membership-with-applescript/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 04:00:38 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Directory Services]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Open Directory]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Applescript]]></category>
		<category><![CDATA[Directory Service]]></category>
		<category><![CDATA[MCX]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=423</guid>
		<description><![CDATA[The following Applescript will show a selectable, scrollable list of machine accounts in OD, then show which ComputerGroup(s) that computer belongs to. This is a quick way to confirm membership without having to open WorkGroup Manager, and especially handy to allow your techs to verify without being a directory admin <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/view-open-directory-computergroup-membership-with-applescript/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>The following Applescript will show a selectable, scrollable list of machine accounts in OD, then show which ComputerGroup(s) that computer belongs to. This is a quick way to confirm membership without having to open WorkGroup Manager, and especially handy to allow your techs to verify without being a directory admin in OD.<span id="more-423"></span></p>
<p>You can download the script <a href="http://macadmincorner.com/files/View%20ComputerGroup%20Membership.zip">here</a>, or copy/paste the code below into AppleScript Editor. You only need to specify your OD server address.</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Set the domain to your OD domain</span>
<span style="color: #ff0033; font-weight: bold;">set</span> domain <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;od.school.edu&quot;</span>
<span style="color: #ff0033; font-weight: bold;">set</span> computerList <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">paragraphs</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;dscl /LDAPv3/&quot;</span> <span style="color: #000000;">&amp;</span>amp; domain <span style="color: #000000;">&amp;</span>amp; <span style="color: #0066ff;">space</span> <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;-list /Computers&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #ff0033; font-weight: bold;">set</span> computerName <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">choose <span style="color: #ff0033; font-weight: bold;">from</span> list</span> computerList
<span style="color: #ff0033; font-weight: bold;">set</span> memberList <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;dscl /LDAPv3/ecod.as.emory.edu search /ComputerGroups Member&quot;</span> <span style="color: #000000;">&amp;</span>amp; <span style="color: #0066ff;">space</span> <span style="color: #000000;">&amp;</span>amp; computerName <span style="color: #000000;">&amp;</span>amp; <span style="color: #0066ff;">space</span> <span style="color: #000000;">&amp;</span>amp; <span style="color: #009900;">&quot;| grep Member | cut -f1-1&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #0066ff;">display dialog</span> memberList</pre></div></div>

<p>The reason I show a list of computers, instead of asking for one to be typed is because it is case sensitive. So it&#8217;s more consistent to select from a list.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/c6njUDkecx88LCix-praorA8yuM/0/da"><img src="http://feedads.g.doubleclick.net/~a/c6njUDkecx88LCix-praorA8yuM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/c6njUDkecx88LCix-praorA8yuM/1/da"><img src="http://feedads.g.doubleclick.net/~a/c6njUDkecx88LCix-praorA8yuM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=YxaWXoyPdQ4:JHHXHKMfBFo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=YxaWXoyPdQ4:JHHXHKMfBFo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=YxaWXoyPdQ4:JHHXHKMfBFo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=YxaWXoyPdQ4:JHHXHKMfBFo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=YxaWXoyPdQ4:JHHXHKMfBFo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=YxaWXoyPdQ4:JHHXHKMfBFo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/YxaWXoyPdQ4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/view-open-directory-computergroup-membership-with-applescript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/view-open-directory-computergroup-membership-with-applescript/</feedburner:origLink></item>
		<item>
		<title>Updated: Send softwareupdate command through ARD</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/A9dsocFHem4/</link>
		<comments>http://macadmincorner.com/send-softwareupdate-command-through-ard/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 13:00:51 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Desktop Management]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Apple Remote Desktop]]></category>
		<category><![CDATA[Patching]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=411</guid>
		<description><![CDATA[This script will run software updates only on machines that are logged out. This ensures you don&#8217;t reboot machines that are in use and don&#8217;t leave machines in an inconsistent state (by not rebooting after patching). This is not a perfect solution to patching but it&#8217;s better than nothing. You <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/send-softwareupdate-command-through-ard/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>This script will run software updates only on machines that are logged out. This ensures you don&#8217;t reboot machines that are in use and don&#8217;t leave machines in an inconsistent state (by not rebooting after patching). This is not a perfect solution to patching but it&#8217;s better than nothing. You can even schedule this to run on a recurring basis.</p>
<p><strong>Update: </strong>Added sleep command with random wait. This will help alleviate some load on your SUS and perhaps prevent a DOS attack. Thanks to <a href="http://twitter.com/rsaeks" target="_blank">rsaeks</a> via Twitter.</p>
<p>Copy and paste the following into an Apple Remote Desktop (ARD) &#8220;Send Unix Command&#8221; window and send as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Random number of seconds to wait</span>
<span style="color: #666666; font-style: italic;"># The more machines you use this with, the higher the number should be</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">expr</span> <span style="color: #007800;">$RANDOM</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000;">120</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #c20cb9; font-weight: bold;">who</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> console; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> Machine is <span style="color: #000000; font-weight: bold;">in</span> use
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">COMMAND_LINE_INSTALL</span>=<span style="color: #000000;">1</span> softwareupdate <span style="color: #660033;">-i</span> <span style="color: #660033;">-a</span>
shutdown <span style="color: #660033;">-r</span> now
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>


<p><a href="http://feedads.g.doubleclick.net/~a/i0ruTSHgpzhgQ2Pg8ZzyjKDp5Mw/0/da"><img src="http://feedads.g.doubleclick.net/~a/i0ruTSHgpzhgQ2Pg8ZzyjKDp5Mw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/i0ruTSHgpzhgQ2Pg8ZzyjKDp5Mw/1/da"><img src="http://feedads.g.doubleclick.net/~a/i0ruTSHgpzhgQ2Pg8ZzyjKDp5Mw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=A9dsocFHem4:xGz1TCYPVVk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=A9dsocFHem4:xGz1TCYPVVk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=A9dsocFHem4:xGz1TCYPVVk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=A9dsocFHem4:xGz1TCYPVVk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=A9dsocFHem4:xGz1TCYPVVk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=A9dsocFHem4:xGz1TCYPVVk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/A9dsocFHem4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/send-softwareupdate-command-through-ard/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/send-softwareupdate-command-through-ard/</feedburner:origLink></item>
		<item>
		<title>Script to Configure the Mac OS X firewall</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/fZraTW-UX88/</link>
		<comments>http://macadmincorner.com/configure-the-mac-os-x-firewall-with-a-script/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 13:54:39 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Absolute Manage]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Apple Remote Desktop]]></category>
		<category><![CDATA[Desktop Management]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=384</guid>
		<description><![CDATA[Here is a script that can be deployed via ARD, Absolute Manage (LANrev), LANDesk or virtually any other method to enable and configure the firewall for 10.4, 10.5 or 10.6. You will need to decide how exactly you want your clients firewalls configured. Pay special attention to the stealth setting. <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/configure-the-mac-os-x-firewall-with-a-script/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>Here is a script that can be deployed via ARD, Absolute Manage (LANrev), LANDesk or virtually any other method to enable and configure the firewall for 10.4, 10.5 or 10.6. You will need to decide how exactly you want your clients firewalls configured. Pay special attention to the stealth setting. If this is enabled, you will not be able to ping that system which will make discovery difficult if they are on a different subnet than your admin system.</p>
<p style="text-align: center;"><a href="http://blog.macadmincorner.com/wp-content/uploads/2010/01/firewall.png"><img class="aligncenter size-full wp-image-386" title="Firewall" src="http://blog.macadmincorner.com/wp-content/uploads/2010/01/firewall.png" alt="" width="234" height="178" /></a><br />
<span id="more-384"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># enable_firewall.sh</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Patrick Gallagher</span>
<span style="color: #666666; font-style: italic;"># http://macadmincorner.com</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Stealth Mode - Set to 0 to disable</span>
<span style="color: #666666; font-style: italic;"># Stealth mode prevents machine from responding to ping requestst</span>
<span style="color: #666666; font-style: italic;"># Be aware that this would prevent tools such as ARD from discovering</span>
<span style="color: #666666; font-style: italic;"># the machine, though bonjour on the same subnet will still work</span>
&nbsp;
<span style="color: #007800;">osversionlong</span>=<span style="color: #000000; font-weight: bold;">`</span>sw_vers -productVersion<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">osvers</span>=<span style="color: #800000;">${osversionlong:3:1}</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Check if this is being run by root</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(whoami)</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;root&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Must be root to run this command.&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">2</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Enable firewall for Tiger</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$osvers</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">4</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting firewall on a <span style="color: #007800;">${osversionlong}</span> machine&quot;</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>defaults <span style="color: #c20cb9; font-weight: bold;">write</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Preferences<span style="color: #000000; font-weight: bold;">/</span>com.apple.sharing.firewall state <span style="color: #660033;">-bool</span> YES
	<span style="color: #666666; font-style: italic;"># UDP, change to 0 to disable</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>defaults <span style="color: #c20cb9; font-weight: bold;">write</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Preferences<span style="color: #000000; font-weight: bold;">/</span>com.apple.sharing.firewall udpenabled  <span style="color: #660033;">-int</span> <span style="color: #000000;">1</span>
	<span style="color: #666666; font-style: italic;"># Stealth, change to 0 to disable</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>defaults <span style="color: #c20cb9; font-weight: bold;">write</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Preferences<span style="color: #000000; font-weight: bold;">/</span>com.apple.sharing.firewall stealthenabled <span style="color: #660033;">-int</span> <span style="color: #000000;">1</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>FirewallTool
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Enable firewall for Leopard or Snow Leopard</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$osvers</span> <span style="color: #660033;">-ge</span> <span style="color: #000000;">5</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting firewall on a <span style="color: #007800;">${osversionlong}</span> machine&quot;</span>
	<span style="color: #666666; font-style: italic;"># Globalstate - Set to 0 for off, 1 for on, 2 for &quot;Block all incoming access&quot;</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>defaults <span style="color: #c20cb9; font-weight: bold;">write</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Preferences<span style="color: #000000; font-weight: bold;">/</span>com.apple.alf globalstate <span style="color: #660033;">-int</span> <span style="color: #000000;">1</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>defaults <span style="color: #c20cb9; font-weight: bold;">write</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Preferences<span style="color: #000000; font-weight: bold;">/</span>com.apple.alf stealthenabled <span style="color: #660033;">-int</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>


<p><a href="http://feedads.g.doubleclick.net/~a/JqDLoFgpo-UAfhZSYrM6zMgJa2U/0/da"><img src="http://feedads.g.doubleclick.net/~a/JqDLoFgpo-UAfhZSYrM6zMgJa2U/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JqDLoFgpo-UAfhZSYrM6zMgJa2U/1/da"><img src="http://feedads.g.doubleclick.net/~a/JqDLoFgpo-UAfhZSYrM6zMgJa2U/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=fZraTW-UX88:sf4cuhZUfjw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=fZraTW-UX88:sf4cuhZUfjw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=fZraTW-UX88:sf4cuhZUfjw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=fZraTW-UX88:sf4cuhZUfjw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=fZraTW-UX88:sf4cuhZUfjw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=fZraTW-UX88:sf4cuhZUfjw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/fZraTW-UX88" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/configure-the-mac-os-x-firewall-with-a-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/configure-the-mac-os-x-firewall-with-a-script/</feedburner:origLink></item>
		<item>
		<title>Bind to OD Script &amp; Add to Computer Group</title>
		<link>http://feedproxy.google.com/~r/MacAdminCorner/~3/-NXXG1m_6lc/</link>
		<comments>http://macadmincorner.com/bind-to-od-script-add-to-computer-group/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 00:36:01 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Absolute Manage]]></category>
		<category><![CDATA[AD Integration]]></category>
		<category><![CDATA[Directory Services]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Open Directory]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Apple Remote Desktop]]></category>

		<guid isPermaLink="false">http://blog.macadmincorner.com/?p=403</guid>
		<description><![CDATA[The following script is what I use to bind machines to Open Directory and it solves the following challenges:  If bound to another OD domain, it removes that binding. If you&#8217;re not moving from another domain, you can ignore that part, it won&#8217;t hurt that it&#8217;s in there. Adds <span class="post_excerpt_readmore"><a href="http://macadmincorner.com/bind-to-od-script-add-to-computer-group/" title="Read more">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<p>The following script is what I use to bind machines to Open Directory and it solves the following challenges:</p>
<ol>
<li>If bound to another OD domain, it removes that binding. If you&#8217;re not moving from another domain, you can ignore that part, it won&#8217;t hurt that it&#8217;s in there.<span id="more-403"></span></li>
<li>Adds the computer record to OD. Normally with anonymous binds you have to manually add the computer account. This takes care of that by authenticating as a diradmin. Because of this, keep this script in a safe place.</li>
<li>Fixes the search order if the machine is also bound to AD in a golden triangle (or magic triangle) so that Tiger machines use AD first and Leopard/Snow Leopard machines look to OD first.</li>
<li>Bind machine(s) remotely with tools such as Apple Remote Desktop (ARD), Absolute Manage (LANrev) or LANDesk.</li>
</ol>
<p>Please be aware this script might not work in all environments. Try to understand how the script works and be prepared to modify for your environment. One issue I frequently find with any type of binding script (OD or AD) is the timing never seems to be perfect. By that I mean that the script runs faster than the directoryservice process can recognize the changes. I try to account for this by putting in &#8220;sleep xx&#8221; commands in certain places but you may need to play around with this a bit.</p>
<p>What I try to do is follow up the script with a simple &#8220;defaults read /Library/Preferences/DirectoryService/SearchNodeConfig &#8220;Search Node Custom Path Array&#8221; to ensure both OD and AD are in there. If they&#8217;re not, I just run the bind script again and it usually gets it the 2nd time.</p>
<p>To download the script, click <a href="http://blog.macadmincorner.com/files/Bind_to_OD.sh.zip">here</a>.</p>
<p>Or copy/paste:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Patrick Gallagher</span>
<span style="color: #666666; font-style: italic;"># http://www.macadmincorner.com</span>
<span style="color: #666666; font-style: italic;"># Updated 12/11/2009</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># These variables need to be configured for your env</span>
<span style="color: #007800;">odAdmin</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #666666; font-style: italic;">#enter your OD admin name between the quotes</span>
<span style="color: #007800;">odPassword</span>=<span style="color: #ff0000;">&quot;&quot;</span>  <span style="color: #666666; font-style: italic;"># Enter your OD admin password between the quotes</span>
<span style="color: #007800;">domain</span>=<span style="color: #ff0000;">&quot;od.school.edu&quot;</span> <span style="color: #666666; font-style: italic;"># FQDN of your OD domain</span>
<span style="color: #007800;">oldDomain</span>=<span style="color: #ff0000;">&quot;oldod.school.edu&quot;</span> <span style="color: #666666; font-style: italic;"># If moving from another OD, enter that FQDN here</span>
<span style="color: #007800;">oldODip</span>=<span style="color: #ff0000;">&quot;111.222.333.444&quot;</span> <span style="color: #666666; font-style: italic;"># Enter the IP of your old OD</span>
<span style="color: #007800;">ADdomain</span>=<span style="color: #ff0000;">&quot;ad.school.edu&quot;</span> <span style="color: #666666; font-style: italic;"># Enter your AD domain here</span>
<span style="color: #007800;">computerGroup</span>=computers  <span style="color: #666666; font-style: italic;"># Add appropriate computer group you want machines to be added to, case sensitive </span>
&nbsp;
<span style="color: #666666; font-style: italic;"># These variables probably don't need to be changed</span>
<span style="color: #007800;">computerName</span>=<span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scutil <span style="color: #660033;">--get</span> LocalHostName<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">nicAddress</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> en0 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> ether <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $2}'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">check4OD</span>=<span style="color: #000000; font-weight: bold;">`</span>dscl localhost <span style="color: #660033;">-list</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">check4ODacct</span>=<span style="color: #000000; font-weight: bold;">`</span>dscl <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${domain}</span> <span style="color: #660033;">-read</span> Computers<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${computerName}</span> RealName <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">11</span>-<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">check4AD</span>=<span style="color: #000000; font-weight: bold;">`</span>dscl localhost <span style="color: #660033;">-list</span> <span style="color: #000000; font-weight: bold;">/</span>Active\ Directory<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">osversionlong</span>=<span style="color: #000000; font-weight: bold;">`</span>sw_vers -productVersion<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">osvers</span>=<span style="color: #800000;">${osversionlong:3:1}</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Check if on OD already</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${check4OD}</span>&quot;</span> == <span style="color: #ff0000;">&quot;<span style="color: #007800;">${domain}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;This machine is joined to <span style="color: #007800;">${domain}</span> already.&quot;</span>
	<span style="color: #007800;">odSearchPath</span>=<span style="color: #000000; font-weight: bold;">`</span>defaults <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Preferences<span style="color: #000000; font-weight: bold;">/</span>DirectoryService<span style="color: #000000; font-weight: bold;">/</span>SearchNodeConfig <span style="color: #ff0000;">&quot;Search Node Custom Path Array&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$domain</span><span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odSearchPath}</span>&quot;</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$domain</span> not found in search path. Adding...&quot;</span>
		dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$domain</span>
		<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">10</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${check4OD}</span>&quot;</span> == <span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldDomain}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Removing from <span style="color: #007800;">${oldDomain}</span>&quot;</span>
	dsconfigldap <span style="color: #660033;">-r</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldDomain}</span>&quot;</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-delete</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldDomain}</span>&quot;</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search<span style="color: #000000; font-weight: bold;">/</span>Contacts <span style="color: #660033;">-delete</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldDomain}</span>&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Binding to <span style="color: #007800;">$domain</span>&quot;</span>
	dsconfigldap <span style="color: #660033;">-v</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">$domain</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$domain</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-create</span> <span style="color: #000000; font-weight: bold;">/</span> SearchPolicy CSPSearchPath
	<span style="color: #c20cb9; font-weight: bold;">killall</span> DirectoryService
<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${check4OD}</span>&quot;</span> == <span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldODip}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Removing from <span style="color: #007800;">${oldODip}</span>&quot;</span>
		dsconfigldap <span style="color: #660033;">-r</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldODip}</span>&quot;</span>
		dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-delete</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldODip}</span>&quot;</span>
		dscl <span style="color: #000000; font-weight: bold;">/</span>Search<span style="color: #000000; font-weight: bold;">/</span>Contacts <span style="color: #660033;">-delete</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">${oldODip}</span>&quot;</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Binding to <span style="color: #007800;">$domain</span>&quot;</span>
		dsconfigldap <span style="color: #660033;">-v</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">$domain</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$domain</span>
		dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-create</span> <span style="color: #000000; font-weight: bold;">/</span> SearchPolicy CSPSearchPath
		<span style="color: #c20cb9; font-weight: bold;">killall</span> DirectoryService
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;No previous OD servers found, binding to <span style="color: #007800;">$domain</span>&quot;</span>
	dsconfigldap <span style="color: #660033;">-v</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">$domain</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$domain</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-create</span> <span style="color: #000000; font-weight: bold;">/</span> SearchPolicy CSPSearchPath
	<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">10</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #000000; font-weight: bold;">/</span>LDAPV3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$domain</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Killing DirectoryService&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">killall</span> DirectoryService
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${check4ODacct}</span>&quot;</span> == <span style="color: #ff0000;">&quot;<span style="color: #007800;">${computerName}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;This machine has a computer account on <span style="color: #007800;">${domain}</span> already.&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Adding computer account to <span style="color: #007800;">${domain}</span>&quot;</span>
	dscl <span style="color: #660033;">-u</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odAdmin}</span>&quot;</span> <span style="color: #660033;">-P</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odPassword}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${domain}</span> <span style="color: #660033;">-create</span> <span style="color: #000000; font-weight: bold;">/</span>Computers<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${computerName}</span> ENetAddress <span style="color: #ff0000;">&quot;<span style="color: #007800;">$nicAddress</span>&quot;</span>
	dscl <span style="color: #660033;">-u</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odAdmin}</span>&quot;</span> <span style="color: #660033;">-P</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odPassword}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${domain}</span> <span style="color: #660033;">-merge</span> <span style="color: #000000; font-weight: bold;">/</span>Computers<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${computerName}</span> RealName <span style="color: #800000;">${computerName}</span>
	<span style="color: #666666; font-style: italic;"># Add computer to ComputerList</span>
	dscl <span style="color: #660033;">-u</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odAdmin}</span>&quot;</span> <span style="color: #660033;">-P</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odPassword}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${domain}</span> <span style="color: #660033;">-merge</span> <span style="color: #000000; font-weight: bold;">/</span>ComputerLists<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${computerGroup}</span> apple-computers <span style="color: #800000;">${computerName}</span>		
&nbsp;
	<span style="color: #666666; font-style: italic;"># Set the GUID</span>
	<span style="color: #007800;">GUID</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(dscl /LDAPv3/${domain} -read /Computers/${computerName} GeneratedUID | awk '{ print $2 }')</span>&quot;</span>
	<span style="color: #666666; font-style: italic;"># Add to computergroup</span>
	dscl <span style="color: #660033;">-u</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odAdmin}</span>&quot;</span> <span style="color: #660033;">-P</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odPassword}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${domain}</span> <span style="color: #660033;">-merge</span> <span style="color: #000000; font-weight: bold;">/</span>ComputerGroups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${computerGroup}</span> apple-group-memberguid <span style="color: #ff0000;">&quot;<span style="color: #007800;">${GUID}</span>&quot;</span>
	dscl <span style="color: #660033;">-u</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odAdmin}</span>&quot;</span> <span style="color: #660033;">-P</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${odPassword}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${domain}</span> <span style="color: #660033;">-merge</span> <span style="color: #000000; font-weight: bold;">/</span>ComputerGroups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${computerGroup}</span> memberUid <span style="color: #800000;">${computerName}</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">25</span> <span style="color: #666666; font-style: italic;"># Give DS a chance to catch up</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Fix DS search order</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Checking DS search order...&quot;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${check4AD}</span>&quot;</span> == <span style="color: #ff0000;">&quot;<span style="color: #007800;">${adDomain}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	dsconfigad <span style="color: #660033;">-alldomains</span> <span style="color: #7a0874; font-weight: bold;">enable</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-delete</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/<span style="color: #007800;">${adDomain}</span>&quot;</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search<span style="color: #000000; font-weight: bold;">/</span>Contacts <span style="color: #660033;">-delete</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/<span style="color: #007800;">${adDomain}</span>&quot;</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$osvers</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">4</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;OS detected as <span style="color: #007800;">${osversionlong}</span>&quot;</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting AD, then OD to search order...&quot;</span>
		dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">2</span> <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
		dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">3</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$domain</span>
		dscl <span style="color: #000000; font-weight: bold;">/</span>Search<span style="color: #000000; font-weight: bold;">/</span>Contacts <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
	<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #800000;">${osvers}</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #000000;">6</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;OS detected as <span style="color: #007800;">${osversionlong}</span>&quot;</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting OD, then AD to search order...&quot;</span>
		dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">3</span> <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
		dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$domain</span>
		dscl <span style="color: #000000; font-weight: bold;">/</span>Search<span style="color: #000000; font-weight: bold;">/</span>Contacts <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${check4AD}</span>&quot;</span> == <span style="color: #ff0000;">&quot;All Domains&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	dscl <span style="color: #000000; font-weight: bold;">/</span>Search <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">15</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$osvers</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">4</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;OS detected as <span style="color: #007800;">${osversionlong}</span>&quot;</span>
			<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting AD, then OD to search order...&quot;</span>
			dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">1</span> <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
			dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$domain</span>
		<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #800000;">${osvers}</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #000000;">6</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;OS detected as <span style="color: #007800;">${osversionlong}</span>&quot;</span>
			<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting OD, then AD to search order...&quot;</span>
			dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">/</span>LDAPv3<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$domain</span>
			dscl localhost changei <span style="color: #000000; font-weight: bold;">/</span>Search CSPSearchPath <span style="color: #000000;">3</span> <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
			dscl <span style="color: #000000; font-weight: bold;">/</span>Search<span style="color: #000000; font-weight: bold;">/</span>Contacts <span style="color: #660033;">-append</span> <span style="color: #000000; font-weight: bold;">/</span> CSPSearchPath <span style="color: #ff0000;">&quot;/Active Directory/All Domains&quot;</span>
		<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>	
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Finished. Exiting...&quot;</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>


<p><a href="http://feedads.g.doubleclick.net/~a/ZqcP0SKF6qG8mSdtAWf2cKSL1nk/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZqcP0SKF6qG8mSdtAWf2cKSL1nk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZqcP0SKF6qG8mSdtAWf2cKSL1nk/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZqcP0SKF6qG8mSdtAWf2cKSL1nk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=-NXXG1m_6lc:QfTa3SLozxI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=-NXXG1m_6lc:QfTa3SLozxI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=-NXXG1m_6lc:QfTa3SLozxI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=-NXXG1m_6lc:QfTa3SLozxI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?i=-NXXG1m_6lc:QfTa3SLozxI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/MacAdminCorner?a=-NXXG1m_6lc:QfTa3SLozxI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/MacAdminCorner?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MacAdminCorner/~4/-NXXG1m_6lc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://macadmincorner.com/bind-to-od-script-add-to-computer-group/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://macadmincorner.com/bind-to-od-script-add-to-computer-group/</feedburner:origLink></item>
	</channel>
</rss>

