How can I change hostid?

There is no /etc/hostid file.
I know that there is no relationship between with MAC address and hostid. There are a lot of scripts on the net but how can I exactly do in my case. :rolleyes:

Hi getrue,

You can always try;

man sethostid

The information that you need should be there.

Regards

Dave

# which sethostid
/usr/bin/which: no sethostid in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
# 

:o how can I set new hostid!

sethostid is a a C function defined in unistd.h header file.

If you want to generate a new host ID, you may use /sbin/genhostid program which generates a random host id and writes to /etc/hostid file.

Check "man -k hostid" for more info.

1 Like

thanks so much admin_xor :b: