You are not logged in.
Problem:
Cannot set a valid MAC address using any one of the following commands.
Note 1: I have a database of valid address from which to choose
Note 2: problem exists regardless of terminal I log in from - SSH versus physical access
# ip link set wlan0 address XX:XX:XX:XX:XX:XX
RTNETLINK answers: Invalid argument
# macchanger -r wlan0
Current MAC: XX:XX:XX:XX:XX:XX [wireless] (Senao SL-2011CD)
Permanent MAC: XX:XX:XX:XX:XX:XX [wireless] (Senao SL-2011CD)
[ERROR] Could not change MAC: interface up or insufficient permissions: Invalid argument
# ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX
SIOCSIFHWADDR: Invalid address
Attempted:
1. Web search/forum search
2. Verified LANG is set
3. Verified that the MAC bytes have no leading or trailing characters
This used to work prior to a system upgrade on 2013-04-02, but I cannot determine what package may be causing the problem.
The system is up to date with:
kernel 3.8.8-1-ARCH
iproute2 3.8.0-1
ethtool 1:3.8-1
Any suggestions are appreciated.
Offline
It appears that you're not bringing the interface down before attempting to alter the MAC address, so it would be something like;
# ip link set wlan0 down
# macchanger -r wlan0
# ip link set wlan0 up
You cannot alter the MAC address of an interface whilst it is up or in use. Another way is to switch it off, if say it has a hardware switch as some laptops do.
Offline
I do set the interface down prior to using the iproute commands.
To make a few clarifications:
1. The server is not a laptop
2. The interface is wlan0
3. The hardware is a wireless USB dongle
4. `ip link show wlan0` indicates the interface is DOWN
My script that I use is basically:
#!/bin/bash
ip link set wlan0 down
ip link set wlan0 address XX:XX:XX:XX:XX:XX
ip link set wlan0 up
wpa_supplicant -Dwext -B -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
dhcpd wlan0
Last edited by deekeh (2013-04-25 18:07:51)
Offline
macchanger works fine with the integrated WIFI (Intel Corporation PRO/Wireless 5100 AGN) in my laptop, but not with my USB dongle (Ralink RT3072 using rt2800usb). I experience the same issues with my USB dongle.
It can be related to my last update (2013-05-11) because it used to work with the USB dongle.
Last edited by ramboman (2013-05-21 06:46:19)
Offline