4

Can anybody tell me the way to change MAC of wlan0?

I have tried macchanger commands but nothing works (Ubuntu 12.10-Broadcom Network Adapter).

This is what I am getting:

enter image description here

I have tried the following:

shivendra@shivendra-Rev-1-0:~$ sudo ifconfig eth1 down
[sudo] password for shivendra: 
shivendra@shivendra-Rev-1-0:~$ sudo service network-manager stop
network-manager stop/waiting
shivendra@shivendra-Rev-1-0:~$ sudo macchanger -a eth1
Current MAC: 00:21:00:72:9c:d5 (unknown)
ERROR: Can't change MAC: interface up or not permission: Too many open files in system
shivendra@shivendra-Rev-1-0:~$ sudo macchanger --mac 64:27:37:D8:97:6F eth1
Current MAC: 00:d0:61:9d:bf:a5 (Tremon Enterprises Co., Ltd.)
ERROR: Can't change MAC: interface up or not permission: Too many open files in system
shivendra@shivendra-Rev-1-0:~$ sudo service network-manager start
network-manager start/running, process 2182
shivendra@shivendra-Rev-1-0:~$ sudo macchanger --mac 64:27:37:D8:97:6F eth1
Current MAC: 64:27:37:d8:97:6f (unknown)
ERROR: Can't change MAC: interface up or not permission: Too many open files in system
0

7 Answers 7

5

I can tell you a simple way to change the eth1 address without using macchanger.

sudo ifconfig eth1 down sudo ifconfig eth1 hw ether 00:11:22:33:44:55 sudo ifconfig eth1 up

Then you're all set with your new mac address.

4

Are you sure that modifying eth1 is what you want to do?? Check your Wifi interface name with ifconfig.
What I would do:

sudo service network-manager stop  
sudo macchanger -a wlan0
sudo service network-manager start
2
  • Every other solution i tried was not working for me, but using this i can access the wifi's of others who are protected by mac address. Thanks a ton Mar 31, 2014 at 10:01
  • Also, the only solution that worked for me.
    – direwolf
    Sep 5, 2015 at 12:39
0

Sorry if I'm wrong, isn't there a GUI option in Network manager. Click on the network manager icon > select Edit Connections > Edit your ethernet's properties and look out for Clone MAC address field and enter your new MAC.

0

If you click the networking icon in the Unity 'taskbar' on the top right, then go to Edit Connections, you should be able to switch to the Wireless tab and open an Edit dialog for your connection.

In this edit dialog, the first page has a field to edit your MAC address. You can type right into the text field.

0

You are editing eth1 instead of wlan0, change eth1 to wlan0 and your MAC-address command will work.

So everywhere there is eth1 like this:

sudo macchanger -a eth1

should be like this:

sudo machchanger -a wlan0
0

I wrote a little script that uses macchanger -A to get another MAC address and then updates the necesserary wlan files. Check it out.

Cheers,

Manuel

0

This error:

Too many open files in system

suggests that your system reached maximum open files in the operating system.

Run sysctl kern.num_files to see how many files are currently open, and sysctl kern.maxfiles to check what's the current limit.

To see which files are currently open, run: lsof | grep -w REG.

To increase system limit, run:

sysctl -w kern.maxfiles=20480
sysctl -w kern.maxfilesperproc=4096

Prefix with sudo if required or login as root.

For shell limits (such as Bash), use ulimit command, e.g.

ulimit -Sn 8192 # Increase open files limit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .