修改网卡的MAC

王朝other·作者佚名  2008-05-18
窄屏简体版  字體: |||超大  

我的redhat7.3是这样做的:先在/etc/rc.d/init.d下建一个shell script,名为hwchang,内容如下:

#!/bin/sh

ifconfig eth0 down

ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

ifconfig eth0 up

保存.

然后执行chmod a+x hwchang

再在/etc/rc.d/rc5.d/下建一个链接文件,

用命令 ln -s /etc/rc.d/init.d/hwchang k05hwchang

然后在开始菜单里,system->sysV init

再在runlevel5 下,把hwchang剪切到启动一栏里,注意,他的优先级应该在network之前,即数字要小些.

还有一种方法是先取消开机时就启动network

在/etc/rc.d/rd.local中加入以下语句

ifconfig eth0 down

ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

ifconfig eth0 up

/etc/rc.d/init.d/network start

我的mandrake8.2就是用第二种方法做的

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航