无法修改mac地址
Tofloor
poster avatar
xieyanze
deepin
2017-08-15 18:58
Author
本帖最后由 xieyanze 于 2017-8-15 10:59 编辑

先使用这种方式修改,无效


ifconfig eth0 down
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
ifconfig eth0 up


再使用这种方式:
编辑/etc/network/interfaces:
添加一行脚本:
pre-up ifconfig wlp2s0 hw ether 14:AB:C5:59C:10

也不行


Reply Favorite View the author
All Replies
avatar
jingle
deepin
2017-08-15 19:16
#1
Reply View the author
avatar
Feng Yu
deepin
2017-08-15 19:29
#2
本帖最后由 abcfy2 于 2017-8-15 11:32 编辑

搜了下debian的做法: https://en.wikibooks.org/wiki/Changing_Your_MAC_Address/Linux

  1. On Debian, Ubuntu, and similar systems, place the following in the appropriate section of /etc/network/interfaces (within an iface stanza, e.g., right after the gateway line) so that the MAC address is set when the network device is started:
  2. hwaddress ether 02:01:02:03:04:08
Copy the Code


不过图形界面下用的是NetworkManager,应该是要修改NetworkManager的配置文件
Reply View the author
avatar
yanbowen
deepin
Community Developer
2017-08-15 19:30
#3
试下控制中心网络里的克隆mac address的功能?是否时想要的?
Reply View the author
avatar
zwq133
deepin
2017-08-15 19:46
#4
https://bbs.deepin.org/post/144206
试下控制中心网络里的克隆mac address的功能?是否时想要的?

话说3天前我就用的这个功能,但是改好以后,用ifconfig查看,没起作用。。。。。。
Reply View the author
avatar
yanbowen
deepin
Community Developer
2017-08-15 19:55
#5
using 'ifconfig wlan0 hw ether ' or 'ip link set wlan0 address ' instead of using macchanger works as well
Reply View the author
avatar
yanbowen
deepin
Community Developer
2017-08-15 19:57
#6
或者更改 network-manager 的配置,让设备的 mac address 随机,见:https://blogs.gnome.org/thaller/ ... tworkmanager-1-4-0/
Reply View the author
avatar
xieyanze
deepin
2017-08-15 20:15
#7
https://bbs.deepin.org/post/144206
或者更改 network-manager 的配置,让设备的 mac address 随机,见:https://blogs.gnome.org/thaller/2016 ...

不能随机啊 需要固定mac
Reply View the author
avatar
duanyao
deepin
2017-08-15 21:28
#8
第一种方法,我试了有效。你说的“无效”具体是什么现象?执行命令后的输出是什么?

我发现你用的命令有些奇怪,deepin 系统上有线网卡默认应该是 enp4s0 这样的名字(数字可能不同),而不是 eth0 ,此外你没有用 sudo 。
Reply View the author
avatar
xieyanze
deepin
2017-08-15 21:45
#9
https://bbs.deepin.org/post/144206
第一种方法,我试了有效。你说的“无效”具体是什么现象?执行命令后的输出是什么?

我发现你用的命令有些 ...

我用了sudo 改完之后ifconfig 确实发生了改变,但是无法上网了。关闭wifi再重新打开后 又恢复了原来的mac地址
Reply View the author
avatar
xieyanze
deepin
2017-08-15 22:37
#10
顶一下 急!!!
Reply View the author
avatar
xieyanze
deepin
2017-08-16 00:09
#11
放弃这个操作系统了 坑太多。。
Reply View the author
avatar
jhkwei
deepin
2017-08-16 01:23
#12
这个和 deepin 无关的,如果你写过网卡驱动就知道,
sudo  ifconfig wlp2s0 hw ether 14:AB:C5:59C:10
这个是可以的,不要down ,up
Reply View the author