MAC address / hostid spoofing with ifconfig and LD_PRELOAD
Each networking / ethernet device comes with a MAC address,
which is a serial number for that device, sometimes referred to
as the hostid.
Sometimes you have software that expects a specific MAC address
on your computer. For example, some license managers
require a specific MAC address or hostid on your first networking card.
Unfortunately if you don't have control over what order the networking cards
boot up in, then this may change from boot to boot.
(Update: I've found that you can solve this issue by
setting rules in /etc/udev, though I immediately
ran into another reason for spoofing, so YMMV)
If this happens, the license manager may not allow you
to run software that you have legitimately paid for.
One way to get around this is by "spoofing" the MAC address.
There are a number of techniques for this:
Some systems will let ifconfig change the MAC address of a NIC:
# (As root)
sudo ifconfig eth0 hw ether 01:02:03:04:05:06
Use LD_PRELOAD to alter the behavior of ioctl.
Here is some source that does exactly that: