Yes I can change MAC manually using ifconfig or other tools. But I would like to change MAC automatically when network device is attaching. The problem is that I have two RNDIS device which utilize the same MAC address. The NetworkManager in Ubuntu is able to change MAC automatically based on original MAC. But it is not the case because I need to make some checks, e.g. change mac only if first card is already attached and do not make anything if no card with RNDIS driver is attached. Udev is operate with MAC address through ATTRS{address} but I didn't find how to rewrite this attribute: error opening ATTR{/sys/devices/.../net/eth1/address} for writing: Permission denied It seems to me NetworkManager uses libudev to operate with mac, but I can't realize how to operate with mac using udev rules. BR, Sasha 2011/10/18 Kay Sievers <kay.sievers@xxxxxxxx>: > On Tue, Oct 18, 2011 at 11:49, Sasha Alko <alkosasha@xxxxxxxxx> wrote: >> Does anybody have an example how to change MAC address using udev? > > You can probably set it temporarily with the /sbin/ip tool. > > Usually, MAC addresses are part of the hardware, burned into the ROM > of your network card. Udev itself has absolutely no idea about > specific hardware settings. > > Kay > -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html