On the computer
All distributions
TODO: develop procedure for renaming the volume group and document here (when / is on LVM as ours normally are, this may require rebuilding the initial RAM disk, re-configuring the boot manager, editing fstab ...). Maybe useful links: https://we.riseup.net/debian/renaming-a-lvm-root-volume-group, https://bugzilla.redhat.com/show_bug.cgi?id=230190#c17 (RedHat),
TODO: is any postfix re-configuration required?
Debian
Reference: Debian WIKI page on changing hostname.
Slackware
As root either run netconfig
(full prompted re-configuration requiring IP addresses and domain name) or do it the manual way by editing:
- /etc/hosts
- /etc/HOSTNAME
- /etc/NetworkManager/NetworkManager.conf (if it exists)
- /etc/rc.d/inet1.conf (if supplying hostname to DHCP server)
then run /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
If running or using any of avahi, CUPS, ejabberd, Exim, /etc/motd, OpenSSH server, ssmtp or sysklogd then read the Debian WIKI page on changing hostname
Ubuntu
Not tested: as root, edit the new host name into /etc/hostname and run start hostname
Not tested (may all be done by the command above): if running or using any of avahi, CUPS, ejabberd, Exim, /etc/motd, OpenSSH server, ssmtp or sysklogd then read the Debian WIKI page on changing hostname.
Changes required on other computers
DNS servers
On DNS servers which have record(s) for the old name, change both the forward and reverse data files.
When the hostname of a system on the Blue Light LANs (192.168.10.0 and 192.168.28.0) is changed, the DNS service on backupserver will need re-configuring as documented in DNS server (bind) administration.
/etc/hosts files
On computers with an /etc/hosts file which has record(s) for the old name, change the line.