Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

El Aldio

macrumors newbie
Original poster
Oct 23, 2011
3
0
Hi MacRumors, I’ve got a problem with my Mac that could be probably solved with new logicboard but no warranty = no luck.
Problem is that MAC address of my ethernet keeps changing to something like 00:01:xx:xx:xx:xx. This causes two problems for me: school network has problem assigning IP address since it’s different than the right (registered) one. Second problem is that apps from MAS want to re-authorize every time saying they were bought from different computer (but if I login with my Apple ID, it works). Both problems are solved if I change ethernet address before I either connect to the network or launch one of those apps.
So I came up with this AppleScript, made it run after startup and deleted app (Window Magnet) that had problem with wrong address from Login items:
Code:
set ethad to do shell script "ifconfig en0 |grep ether"
if ethad is " ether c8:bd:xx:xx:xx:xx " then
tell application "Window Magnet" to activate
else
do shell script "sudo ifconfig en0 ether c8:bd:xx:xx:xx:xx
echo password"
tell application "Window Magnet" to activate
end if

What I want it to do:
  • ask current ethernet mac address
  • if it’s right, launch Window Magnet
  • if it isn’t then run command to change MAC address to the original one
  • enter password (echo command: didn’t find better way)
  • activate Window Magnet
It worked for about a week but now it simply says there’s an error number 10810.
Do you have any ideas how to fix it or where could be a problem? Or should I rewrite it (how?)?
 
Hi MacRumors, I’ve got a problem with my Mac that could be probably solved with new logicboard but no warranty = no luck.
Problem is that MAC address of my ethernet keeps changing to something like 00:01:xx:xx:xx:xx. This causes two problems for me: school network has problem assigning IP address since it’s different than the right (registered) one. Second problem is that apps from MAS want to re-authorize every time saying they were bought from different computer (but if I login with my Apple ID, it works). Both problems are solved if I change ethernet address before I either connect to the network or launch one of those apps.
So I came up with this AppleScript, made it run after startup and deleted app (Window Magnet) that had problem with wrong address from Login items:
Code:
set ethad to do shell script "ifconfig en0 |grep ether"
if ethad is " ether c8:bd:xx:xx:xx:xx " then
tell application "Window Magnet" to activate
else
do shell script "sudo ifconfig en0 ether c8:bd:xx:xx:xx:xx
echo password"
tell application "Window Magnet" to activate
end if

What I want it to do:
  • ask current ethernet mac address
  • if it’s right, launch Window Magnet
  • if it isn’t then run command to change MAC address to the original one
  • enter password (echo command: didn’t find better way)
  • activate Window Magnet
It worked for about a week but now it simply says there’s an error number 10810.
Do you have any ideas how to fix it or where could be a problem? Or should I rewrite it (how?)?

Code:
set ethad to do shell script "ifconfig en0 |grep ether"
if ethad is " ether c8:bd:xx:xx:xx:xx " then
tell application "Window Magnet" to activate
else
do shell script "sudo ifconfig en0 ether c8:bd:xx:xx:xx:xx" with administrator privileges
tell application "Window Magnet" to activate
end if

Sorry I can't test the syntax at the office but the general idea is to add "with adminstrator" to any shell script that needs your password to do something and it will prompt the user when it gets to that line.
 
Thanks man! It seems to be working for now. I will see if it stays this way after a few reboots.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.