Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Desktops > iMac

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 6, 2011, 02:08 PM   #1
Apoph
macrumors newbie
 
Join Date: Apr 2011
permanent change of MAC address in Mac OS X

Hi there.
Basically, the title says all.
I have question - how to change MAC address in Mac OS X permanently?
I've tried using "sudo ifconfig en0 ether 00:01:02:03:04:05",
but changing the MAC address in this way is not permanent: after a reboot, it will revert to the MAC address physically stored in the card. So, is there a way to change it once and for all ?
Apoph is offline   0 Reply With Quote
Old Apr 6, 2011, 02:21 PM   #2
old-wiz
macrumors 604
 
Join Date: Mar 2008
Location: West Suburban Boston Ma
The original address is hard encoded in the hardware. Any changes will be temporary and there's no way to do it permanently short of munging around with the hardware.
old-wiz is offline   0 Reply With Quote
Old Apr 6, 2011, 02:43 PM   #3
smithrh
macrumors 68000
 
smithrh's Avatar
 
Join Date: Feb 2009
I suppose you could put the desired MAC address in one of the launchd config files somehow, that way it would be changed at boot time.

Caveat, I haven't learned launchd, only have been familiar with rc.boot and rc.local type config files, so maybe this wouldn't work.

Apple sure doesn't seem to like supporting MAC address changes, you can't do this on Airport base stations either.
smithrh is offline   0 Reply With Quote
Old Apr 6, 2011, 02:46 PM   #4
Apoph
Thread Starter
macrumors newbie
 
Join Date: Apr 2011
Yeah, i need an ifconfig line to automatically change my MAC on boot. But how this can be done?
Apoph is offline   0 Reply With Quote
Old Apr 6, 2011, 04:48 PM   #5
Drewbie
macrumors member
 
Join Date: Aug 2010
can you put that terminal command into an apple script?

if you can put it in apple script you should be able to add that script to login items, which would run it upon logging into the system...
Drewbie is offline   0 Reply With Quote
Old Apr 6, 2011, 06:52 PM   #6
tcassio
macrumors newbie
 
Join Date: Mar 2011
Cool

I believe that you can't permantly chage any MAC address on any piece of hardware that has a nic interface. The system was designed this way to eliminate the possibility of 2 pieces of equipment from having the same MAC address.
tcassio is offline   0 Reply With Quote
Old Apr 6, 2011, 07:25 PM   #7
smithrh
macrumors 68000
 
smithrh's Avatar
 
Join Date: Feb 2009
Quote:
Originally Posted by tcassio View Post
I believe that you can't permantly chage any MAC address on any piece of hardware that has a nic interface. The system was designed this way to eliminate the possibility of 2 pieces of equipment from having the same MAC address.
Lots of interfaces allow changing the MAC.

Apple is a bit more strict here though. Why, not entirely sure.

I understand what you're saying, MACs are supposed to be fixed but somehow over time they've become editable.

Last edited by smithrh; Apr 6, 2011 at 07:27 PM. Reason: fixing oopsie
smithrh is offline   0 Reply With Quote
Old Apr 6, 2011, 07:43 PM   #8
Apoph
Thread Starter
macrumors newbie
 
Join Date: Apr 2011
I found these instructions. Will they work and is it safe to use them?


Follow these steps to create a script that sets the MAC Address each time the computer restarts:

1. Open Terminal (/Applications/Utilities/).
2. Type: cd /Library
3. Press Return.
4. Type: mkdir StartupItems
5. Press Return. (If you encounter an error, continue to step 6.)
6. Type: cd StartupItems
7. Press Return.
8. Type: mkdir MACADD
9. Press Return.
10. Type: cd MACADD
11. Press Return.
12. Type: pico MACADD
13. Press Return.
14. In the pico editor, paste in the following text.

Begin copying below this line.
--------------------------------------------------------------------------------

#!/bin/sh

. /etc/rc.common

##
# Configure a network interface MAC Address setting
##
#
# This script will set the MAC Address setting for the specified interface(s)
#
# The name of the interface (ex. en0) must be edited to match the interface
# to which the MACADD setting should be applied
#
##

StartService ()
{
ConsoleMessage "Configuring MACADD"

### uncomment lines and change the value following 'MACADD' as appropriate mac address

if [ "${MACADD:=-NO-}" = "-YES-" ]; then

# /sbin/ifconfig en0 lladdr xx:xx:xx:xx:xx:xx
# /sbin/ifconfig en1 lladdr xx:xx:xx:xx:xx:xx

fi

}

StopService ()
{
return 0
}

RestartService ()
{
return 0
}

RunService "$1"

--------------------------------------------------------------------------------

End copying above this line.

15. Uncomment the /sbin/ifconfig line(s) to set the MACADD for a particular interface.


Note: Removing the number sign (#) from the beginning of a line uncomments it. Typically, en0 is the interface name for the Built-in Ethernet port and en1 is interface name for the AirPort Card. This is not always the case, though. To confirm that a network port is associated with a particular interface name, open the Network Utility (/Applications/Utilities/), and click the Info tab.


16. When you have finished customizing the file, save it (press Control-O), press Return, and exit pico (press Control-X).

17. Type: chmod 755 MACADD

18. Press Return.

19. Type: pico StartupParameters.plist

20. Press Return.

21. In the pico editor paste in the following text.


Begin copying below this line.


--------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Can set MACADD</string>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>MACADD</string>
</array>
<key>Requires</key>
<array>
<string>Network Configuration</string>
</array>
</dict>
</plist>

--------------------------------------------------------------------------------

End copying above this line.

22. When you have finished customizing the file, save it (Control-O), press Return, and exit pico (Control-X).
23. Type: chmod 755 StartupParameters.plist
24. Press Return.
25. Type: sudo pico /etc/hostconfig
26. When prompted, enter your password.
27. Press Return.
28. In the pico editor, add this line at the bottom:

MACADD=-YES-

29. Save it (Control-O), press Return, and exit pico (Control-X).

When you restart the computer, MACADD is set for the interface that you specified.

Notes


1. The MACADD will be reset after changing a Location, waking the computer from sleep, or changing the state of the network interface. To use the script again without having to restart, enter the following command:

sudo SystemStarter start MACADD

2. If you experience any issues or wish to not set MACADD during startup, you can turn off the new script by changing the MACADD line in /etc/hostconfig to:

MACADD=-NO-

Sorry, for a long post.
Apoph is offline   0 Reply With Quote
Old Apr 6, 2011, 07:48 PM   #9
JimMacFan
macrumors regular
 
Join Date: Jan 2009
Quote:
Originally Posted by Apoph View Post
Hi there.
Basically, the title says all.
I have question - how to change MAC address in Mac OS X permanently?
I've tried using "sudo ifconfig en0 ether 00:01:02:03:04:05",
but changing the MAC address in this way is not permanent: after a reboot, it will revert to the MAC address physically stored in the card. So, is there a way to change it once and for all ?
Why change MAC address? Up to no good?
JimMacFan is offline   0 Reply With Quote
Old Apr 6, 2011, 08:01 PM   #10
harcosparky
macrumors 68020
 
Join Date: Jan 2008
Quote:
Originally Posted by JimMacFan View Post
Why change MAC address? Up to no good?

BINGO !!!!


What possible legitimate purpose could there be for changing a MAC address?

MAC addresses are unique to each card, like the fingerprint on your fingers.

.




.
__________________
Awwwwwww!
harcosparky is offline   0 Reply With Quote
Old Apr 7, 2011, 04:05 AM   #11
Apoph
Thread Starter
macrumors newbie
 
Join Date: Apr 2011
Well some ISP bind internet connection to a certain MAC address. And i have few computers i need to connect sometimes.
And the question was not "why do i need to change MAC address".
Apoph is offline   0 Reply With Quote
Old Apr 7, 2011, 04:29 AM   #12
harcosparky
macrumors 68020
 
Join Date: Jan 2008
Which ISP do you have that tells you to change the MAC address of a NIC?

I mean even the IPS's know that a MAC address is hard coded and unique to each NIC.

I've never heard of an ISP binding a connection to a SINGLE PC.
__________________
Awwwwwww!

Last edited by harcosparky; Apr 7, 2011 at 04:43 AM.
harcosparky is offline   0 Reply With Quote
Old Apr 7, 2011, 10:08 AM   #13
smithrh
macrumors 68000
 
smithrh's Avatar
 
Join Date: Feb 2009
Quote:
Originally Posted by harcosparky View Post
Which ISP do you have that tells you to change the MAC address of a NIC?

I mean even the IPS's know that a MAC address is hard coded and unique to each NIC.

I've never heard of an ISP binding a connection to a SINGLE PC.
Mine does. And it's one of the biggest ISPs out there.

Having said that, I think the OP might look into buying a router if this is indeed the issue.
smithrh is offline   1 Reply With Quote
Old Aug 9, 2013, 01:21 PM   #14
Mastrix56
macrumors newbie
 
Join Date: Aug 2013
Thanks for the Info and a question

Apoph,


What types of parameters need changing in the StartupParameters.plist?

I didnt change anything in that file and its not working for me.

Thanks!
Mastrix56 is offline   0 Reply With Quote
Old Aug 9, 2013, 01:29 PM   #15
jsw
Moderator emeritus
 
jsw's Avatar
 
Join Date: Mar 2004
Location: Andover, MA
Quote:
Originally Posted by smithrh View Post
Having said that, I think the OP might look into buying a router if this is indeed the issue.
This is, by far, the best way to go about doing this.

Get a router with an alterable MAC address, hook it up, profit.

Edit: my apologies... I didn't realize how old this thread was prior to the reply above mine.
__________________
You'll be the one moaning for me to give you some. - THC(taken out of context)

Last edited by jsw; Aug 9, 2013 at 02:38 PM.
jsw is offline   0 Reply With Quote
Old Aug 9, 2013, 01:55 PM   #16
tobefirst
macrumors 68030
 
tobefirst's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
At the Panera Bread closest to my home (where they call them St. Louis Bread Co), they have a 30 minute limit on their wifi, even during non-peak times. I've changed my MAC address to get around this limitation.
__________________
soupmagazine.net
graphic design portfolio
tobefirst is offline   0 Reply With Quote
Old Aug 9, 2013, 02:00 PM   #17
Mastrix56
macrumors newbie
 
Join Date: Aug 2013
Mobility...

Quote:
Originally Posted by jsw View Post
This is, by far, the best way to go about doing this.

Get a router with an alterable MAC address, hook it up, profit.

I totally agree with the router, its hard to find one that doesn't let you change the MAC. Comcast will many times install to a single PC and use the MAC of the PC NIC and limit you on the network to only that MAC address. Not always, its weird. Then you want to add devices and a wifi router and you have to spoof the address.

I think a lot of people want to do it at the laptop layer so the MAC is protected whereever they roam. Scandalous reasons? Better security, the right to anonymity, I dont know but the script is very useful and appreciated
Mastrix56 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Desktops > iMac

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Make Mac OS Forget Server alexanderl OS X 1 May 3, 2012 03:43 AM
Mac OS X 10.8 Nyan Cat Vasileios Wasteland 6 Jul 22, 2011 08:45 AM
Backup drives in Mac Pro bLiss Mac Pro 4 May 29, 2011 03:49 PM
How to change the MAC address in Fusion? hajime Windows, Linux & Others on the Mac 7 Sep 19, 2010 10:53 AM
Change of email address from .mac to me.com G8AMB iPhone Tips, Help and Troubleshooting 0 Sep 1, 2008 03:38 AM


All times are GMT -5. The time now is 05:37 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC