Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
akashkushawah204 opened this issue May 4, 2021 · 21 comments

Comments

@akashkushawah204
Copy link

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

@xineur
Copy link

xineur commented May 8, 2021

use sudo macchanger [options] device

@shoox8
Copy link

shoox8 commented Sep 24, 2021

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

@lleevveell66
Copy link

lleevveell66 commented Oct 6, 2021

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
Copy link

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
Copy link

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
Copy link

use: sudo macchanger -A eth0

@LazizbekDev
Copy link

use: sudo macchanger -A eth0

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

@fodelao29
Copy link

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
Copy link

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
Copy link

On a similar card, this works for me:

sudo ifconfig wlan0 down
sudo macchanger -br wlan0
sudo ifconfig wlan0 up

@fodelao29
Copy link

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
Copy link

bugraa212 commented Jan 11, 2023

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
Copy link

dami4nC commented Apr 22, 2023

This worked for me.

Captura3

YouTube

@ghost
Copy link

ghost commented Jul 9, 2023

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
Copy link

AlF067 commented Aug 27, 2023

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

@chrisdel101
Copy link

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
Copy link

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
Copy link

i have a brodcam 43142

@sansubr
Copy link

sansubr commented Jul 24, 2024

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

@muddasirkundi
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

17 participants