Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I want to change the mac address of eth0 of my Raspberry Pi.
I haven't any problems with the wlan0 (macchanger -A wlan0 works)

General information: I have

  • a Raspberry Pi Model B
  • with Arch Linux ARM (archlinux-hf-2013-06-06)

I used

# macchanger -A eth0 

and get this result

Current MAC:   b8:27:eb:bc:d5:fd (Raspberry Pi Foundation)
Permanent MAC: 00:00:00:00:00:00 (Xerox Corporation)
[ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy

and

# ifconfig eth0 down hw ether 01:02:03:04:05:06

with this error

SIOCSIFHWADDR: Cannot assign requested address

I googled a bit and found this. I think there is someone with the same problem but I can't find a solution.

The question is now: Why i get these error messages (when do macchanger / ifconfig makes such an output?) and maybe what can I do to remove them and finally change the mac address?

share|improve this question
    
would you prefer a C code to do the MAC setting? –  askmish Jul 31 at 12:11

3 Answers 3

Did you forgot sudo? So try sudo macchanger -A eth0 And why you want to change the mac address?

share|improve this answer
    
no i was logged in as root (look at the '#', if you are a normal user you will get a '$') –  Fabian N. Jul 11 '13 at 20:00
    
Ow sorry! I probably looked over it! –  Matthijs Logemann Jul 11 '13 at 21:52
  1. Write a script

#! /bin/sh ifconfig eth0 down hw ether 00:00:00:00:00:00 ifconfig eth0 up

where "00:00:00:00:00:00" - your mac address Lets say you called it mac.sh.

  1. Put it in the /etc/init.d/ directory. And make this file executable using # chmod +x mac.sh

  2. Then run: # update-rc.d mac.sh defaults

That's make your script bootable.

  1. After rebooting mac will be changed

I got this from internet.

share|improve this answer

Just add smsc95xx.macaddr=00:00:00:00:00:00 to /boot/cmdline.txt.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.