alobbs / macchanger

GNU MAC Changer
http://www.gnu.org/software/macchanger
GNU General Public License v3.0
601 stars 113 forks source link

[ERROR] Could not change MAC: interface up or insufficient permissions: Operation not permitted #76

Open akashkushawah204 opened 3 years ago

akashkushawah204 commented 3 years ago

[ERROR] Could not change MAC: interface up or insufficient permissions: Operation not permitted

xineur commented 3 years ago

use sudo macchanger [options] device

shoox8 commented 3 years ago

Not working! I have the same error. I use sudo and ifconfig wlan down, but the problem continue

lleevveell66 commented 3 years ago

Same. RockyOS 8.4, so basically CentOS 8. Kernel 4.18.0-305.19.1.el8_4.x86_64 .

[root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 down [root@DHCP-40-118 ~]# macchanger -m 33:11:33:33:33:77 wlp0s21f0u2u2 Current MAC: 72:44:3f:31:0f:17 (unknown) Permanent MAC: c8:3a:35:cb:6d:df (Tenda Technology Co., Ltd.) [ERROR] Could not change MAC: interface up or insufficient permissions: Cannot assign requested address [root@DHCP-40-118 ~]#

But, randomizing works:

[root@DHCP-40-118 ~]# macchanger -r wlp0s21f0u2u2 Current MAC: 72:44:3f:31:0f:17 (unknown) Permanent MAC: c8:3a:35:cb:6d:df (Tenda Technology Co., Ltd.) New MAC: 82:b5:78:df:e0:76 (unknown) [root@DHCP-40-118 ~]#

Well, not really:

[root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 up [root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 wlp0s21f0u2u2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 56:8a:44:f5:4d:ee txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

So, I have three of the same Tenda USB Wifi adapters. Think that is hosing it, maybe? I do not see 82:b5:78:df:e0:76 on any of them.

lleevveell66 commented 3 years ago

This may be an issue with the RT driver:

[root@DHCP-40-118 ~]# ip link set dev wlp0s21f0u2u2 down [root@DHCP-40-118 ~]# ip link set dev wlp0s21f0u2u2 address 33:11:33:33:77:33 RTNETLINK answers: Cannot assign requested address [root@DHCP-40-118 ~]# ip link set dev wlp0s21f0u2u2 up [root@DHCP-40-118 ~]#

These are:

Bus 001 Device 010: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter Bus 001 Device 009: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter Bus 001 Device 007: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

lleevveell66 commented 3 years ago

Nope. This is "I/O Error" (Idiot Operator).

[root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 down [root@DHCP-40-118 ~]# macchanger --mac=00:00:00:31:33:73 wlp0s21f0u2u2 Current MAC: fa:b1:c8:e2:59:39 (unknown) Permanent MAC: c8:3a:35:cb:6d:df (Tenda Technology Co., Ltd.) New MAC: 00:00:00:31:33:73 (XEROX CORPORATION) [root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 up

Choose a different address w/o multicast bit set.

Reference: https://superuser.com/questions/725467/set-mac-address-fails-rtnetlink-answers-cannot-assign-requested-address

SelikemAB commented 2 years ago

use: sudo macchanger -A eth0

LazizbekDev commented 2 years ago

use: sudo macchanger -A eth0

wow, this is working :) but i hava a question, why wlan0 is not working :(

fodelao29 commented 2 years ago

use: sudo macchanger -A eth0

wow, this is working :) but i hava a question, why wlan0 is not working :(

u need to know the name of your driver, if its wlan0 or wlanmon then u should turn down, change the mac adress and then turn it up again.

llflight commented 2 years ago

I have the same problem. Again, macchanger works for the ethernet card, but not for the wifi card (giving the same error as for OP). Do the different capabilities of different drivers matter here? My wireless card is a Broadcom 4352 with a janky driver.

JonnyTech commented 2 years ago

On a similar card, this works for me:

sudo ifconfig wlan0 down
sudo macchanger -br wlan0
sudo ifconfig wlan0 up
fodelao29 commented 2 years ago

I have the same problem. Again, macchanger works for the ethernet card, but not for the wifi card (giving the same error as for OP). Do the different capabilities of different drivers matter here? My wireless card is a Broadcom 4352 with a janky driver.

If ur using Kali Linux or smtng similar but as a VM, probably you need to use an external wi-fi card, I had to buy one just tu use it for kali.

bugraa212 commented 1 year ago

It's been a while but here is what I tried and worked; ifconfig wlan0 down macchanger --random wlan0 ifconfig wlan0 up You must enter the codes in order

dami4nC commented 1 year ago

This worked for me.

Captura3

YouTube

ghost commented 1 year ago

use: sudo macchanger -A eth0

yes its absolutely working !!

$sudo macchanger -a device

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
AlF067 commented 1 year ago

For wlan0, you can try : sudo systemctl stop NetworkManager sudo macchanger -r wlan0 sudo systemctl start NetworkManager

chrisdel101 commented 10 months ago

Nope. This is "I/O Error" (Idiot Operator).

[root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 down [root@DHCP-40-118 ~]# macchanger --mac=00:00:00:31:33:73 wlp0s21f0u2u2 Current MAC: fa:b1:c8:e2:59:39 (unknown) Permanent MAC: c8:3a:35:cb:6d:df (Tenda Technology Co., Ltd.) New MAC: 00:00:00:31:33:73 (XEROX CORPORATION) [root@DHCP-40-118 ~]# ifconfig wlp0s21f0u2u2 up

Choose a different address w/o multicast bit set.

Reference: https://superuser.com/questions/725467/set-mac-address-fails-rtnetlink-answers-cannot-assign-requested-address

I had this too. The problem is it gave me permissions error (using sudo) when it was actually an error with my MAC entry. So misleading.

pippo6996 commented 8 months ago

I also have the same problem: with the ethernet card the MAC changes easily but with the WI-FI card it gives this error: [ERROR] Could not change MAC: interface up or insufficient permissions: Operation not supported. I tried to do as you said in the previous comments but I couldn't solve the problem. If anyone can give me a hand I would be happy

pippo6996 commented 8 months ago

i have a brodcam 43142

sansubr commented 4 months ago

If you're in a desktop environment, simply turn off your WiFi, do this and turn it back on. Works fine.

muddasirkundi commented 3 months ago

ld not change MAC

You have to first turn down your wlan0 by command : ifconfig wlan0 down

then use the macchanger command for changing mac address : macchanger -r wlan0

then you will see that the mac has been changed. confirm by running the command : macchanger -s wlan0

after successing you need to turn up the wlan0 by using command : ifconfig wlan0 up

muddasirkundi commented 3 months ago

I also have the same problem: with the ethernet card the MAC changes easily but with the WI-FI card it gives this error: [ERROR] Could not change MAC: interface up or insufficient permissions: Operation not supported. I tried to do as you said in the previous comments but I couldn't solve the problem. If anyone can give me a hand I would be happy

just simply turn down your wlan0 by the "ifconfig wlan0 down" and the use your command and dont forget to turn up wlan0 too by using "ifconfig wlan0 up".

if you want to see if your wlan0 is up or not you can use the iwconfig command