[ILUG] PC's Name.
ags-lists at esatclear.ie
Sat May 20 17:59:14 IST 2000
> I have a Linux box on a NT network, the default name of the Linux
> machine is apc088, how can I change this to follow the nameing
> convention used by my network ??
The hostname of the linux box and the name with which it appears on a
windows network (the netbios name) don't necessarily have to be the
To set the netbios name edit /etc/smb.conf so that you have a
netbios name = whatever
To change the linux box's name you could use "hostname -s whatever".
But I don't think it's too reliable. You could try
rgrep -H currentname /etc/* 2>/dev/null | cut -d: -f1 | sort | uniq
grep -Hr currentname /etc/* 2>/dev/null | cut -d: -f1 | sort | uniq
to show you which scripts reference your current hostname. If you
change your current name in these scripts and reboot, you should have
a new hostname.
Btw, for your distro there may be a simpler way to change the hostname
but the above should work for all(most?). In general though, it's
probably best not to rename an existing machine unless necessary.
More information about the ILUG