This is based, in part, upon an anonymous contribution. I've improved
it by making it loadable, so one does not have to build a new kernel.
You'll find the original contribution in ../hostid-by-egid

This will probably only work on versions of Sun OS later than 4.1.

I've tried it on both a Sun 3 and Sun 4.

to use this:
make load
make sethostid
./sethostid 72000000

All numbers are in hex. Do NOT put in the leading 0x.

You can remove the sethostid call by using modunload. You can check
whether or not it is currently installed with modstat.

N.B. sethostid.exec must be executable. Depending upon where you got
the distribution you might have to chmod +x it.

Calling sethostid with the hostid of 0 will restore the hostid to the
default.

e.g.
./sethostid 0

