Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Applescript to set your MAC address on startup

1 post in this topic

Recommended Posts

There are several ethernet cards out there that work, but will give a MAC address of all zeros, 00:00:00:00:00:00 You have to use the terminal each time you restart to set the MAC address. This applescript will automatically set the MAC address on startup. You won't have to do anything, it is all automatic.


1. Open AppleScript Editor and paste the following into a new file.


set newMac to "00:13:72:1B:FF:D1"
set psswrd to "your_password"

repeat with counter from 0 to 50
set currMac to (do shell script "ifconfig en0" & " | grep 'ether '")
if currMac contains "ether" then
exit repeat
end if
on error
delay 2
end try
end repeat

do shell script "ifconfig en0" & " ether " & newMac password psswrd with administrator privileges


2. Replace 00:13:72:1B:FF:D1 and your_password with your own MAC address and password.


3. Save the AppleScript in File Format Application and check the Run Only box. Name it something descriptive like "SetMacAdd." Save it in Applications or somewhere else where you can find it.


4. Open System Preferences and click on Accounts.


5. In Accounts click on the Login Items tab and the use the "+" to add your saved AppleScript to the list of login items.


6. Restart to check if it works.



*Systems running Tiger will use lladdr instead of ether in the script.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.