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

<channel>
	<title>stacyprowell.com &#187; leopard</title>
	<atom:link href="http://stacyprowell.com/blog/tag/leopard/feed/" rel="self" type="application/rss+xml" />
	<link>http://stacyprowell.com/blog</link>
	<description>Ugh, Stacy&#039;s talking again...</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:01:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Mac MAC Address</title>
		<link>http://stacyprowell.com/blog/2009/06/05/mac-mac-address/</link>
		<comments>http://stacyprowell.com/blog/2009/06/05/mac-mac-address/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 18:01:12 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac address]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=12</guid>
		<description><![CDATA[For the record, here&#8217;s how I set the MAC address on my MacBook Pro. As I write this it is running Leopard 10.5.6 and this has been working successfully with every version of Leopard. In fact, it has worked so well I&#8217;d forgotten how I did it, so I&#8217;m basically writing this post so, if [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_211" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-211" title="3d_apple_logo_102" src="http://stacyprowell.com/blog/wp-content/uploads/2009/05/3d_apple_logo_102-150x150.jpg" alt="Apple" width="150" height="150" /><p class="wp-caption-text">Apple</p></div>
<p>For the record, here&#8217;s how I set the MAC address on my MacBook Pro.  As I write this it is running Leopard 10.5.6 and this has been working successfully with every version of Leopard.  In fact, it has worked so well I&#8217;d forgotten how I did it, so I&#8217;m basically writing this post so, if it ever stops working, I will know how to fix it. <img src='http://stacyprowell.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   If it helps you, all the better.  If it hurts you&#8230; well&#8230; don&#8217;t blame me.<span id="more-12"></span></p>
<p>Note that, for reasons obscure, I want to <em>permanently</em> set the MAC address to something other than the hardwired address.  If that&#8217;s not what you want, this recipe might not be for you.</p>
<p>For the record I found the information on creating the startup item <a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html">here</a>.</p>
<p>First create a directory under the <tt>/Library/StartupItems</tt> folder.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>StartupItems<span style="color: #000000; font-weight: bold;">/</span>MACADDR</pre></div></div>

<p>That&#8217;s <tt>MACADDR</tt> for MAC ADDRess, in case you&#8217;re wondering.  I made it all caps so it would be more obvious to me in listings.</p>
<p>Next create the file <tt>/Library/StartupItems/MACADDR/StartupParameters.plist</tt>.  I used VI, but that&#8217;s me.  Use whatever editor you want.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>StartupItems<span style="color: #000000; font-weight: bold;">/</span>MACADDR<span style="color: #000000; font-weight: bold;">/</span>StartupParameters.plist</pre></div></div>

<p>This file needs to have the following content.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
  <span style="color: #00bbdd;">&lt;!DOCTYPE plist SYSTEM &quot;file://localhost/System/Library/DTDs/PropertyList.dtd&quot;&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plist</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Description<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Set the MAC address for specified interfaces.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>OrderPreference<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>None<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Provides<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>MACADDR<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Requires<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Network Configuration<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>I think the <tt>Requires</tt> part is correct; I stole that from looking at the configuration files for tun and tap, since this needs to happen before the network is brought up. It might be a better idea to specify an order, but I have not had trouble leaving it as <tt>None</tt>.</p>
<p>Next create the file <tt>/Library/StartupItems/MACADDR/MACADDR</tt>.  I think this file needs to have the same name as the directory, so if you don&#8217;t like <tt>MACADDR</tt> be sure to use the same name for both the directory and this file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>StartupItems<span style="color: #000000; font-weight: bold;">/</span>MACADDR<span style="color: #000000; font-weight: bold;">/</span>MACADDR</pre></div></div>

<p>This file needs to have the following content, where <tt>ADDRESS</tt> is replaced with the MAC address you want.</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: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.common
&nbsp;
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #666666; font-style: italic;"># Configure the MAC addresses of network interfaces.</span>
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This script will set the hardware MAC address for the specified</span>
<span style="color: #666666; font-style: italic;"># interface(s).  The name of the interface (ex. en0) must be edited</span>
<span style="color: #666666; font-style: italic;"># to match the interface.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Typically the built-in ethernet card is en0, and the built-in</span>
<span style="color: #666666; font-style: italic;"># wifi card is en1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">##</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The start subroutine.</span>
StartService<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  ConsoleMessage <span style="color: #ff0000;">&quot;Configuring MAC address&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;">${MACADDR:=-NO-}</span>&quot;</span> = <span style="color: #ff0000;">&quot;-YES-&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #666666; font-style: italic;"># Make sure the wifi card has the correct MAC address.</span>
    <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> en1 lladdr ADDRESS
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The stop subroutine.</span>
StopService<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">0</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The restart subroutine.</span>
RestartService<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #666666; font-style: italic;"># It might be nice to make this reset the address, but it's never come up.</span>
  <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">0</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
RunService <span style="color: #ff0000;">&quot;$1&quot;</span></pre></div></div>

<p>Again, if you change the name from <tt>MACADDR</tt> make sure to also change it in this file.  Also, do not forget to replace <tt>ADDRESS</tt> with the MAC address you want to use.</p>
<p>These two files create a service that gets started when the Mac boots up.  This &#8220;service&#8221; just sets the MAC address of the wireless card.  Note that if you are running on Tiger you will probably need to use <tt>ether</tt> instead of <tt>lladdr</tt> in the <tt>ifconfig</tt> line.</p>
<p>If you find problems with new versions of OS X, or if I&#8217;ve done something boneheaded above, please add a comment below.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F06%2F05%2Fmac-mac-address%2F&amp;title=Mac%20MAC%20Address" id="wpa2a_2"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/06/05/mac-mac-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

