TBC
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: what is the procedure for renaming an LXC? http://www.bonusbits.com/wiki/HowTo:Rename_LXC_Container
/etc/hosts If the name change includes a domain name change and the old domain name appears in /etc/hosts for the computer then it must be changed.
/etc/resolv.conf{,.head,.tail} If all these conditions are met ...
... then any domain line(s) in /etc/resolv.conf{,.head,.tail} may need adjusting.
TBC. May involve re-generating certificates.
Update by editing:
newalises
command.postmap
command on it, in the /etc/postfix directory.postmap
command on it, in the /etc/postfix directory.Update /etc/postfix/main.cf by (replacing <hostname> and <domain>):
postconf -e myhostname=<hostname>
postconf -e mydestination=<hostname>,localhost.<domain>,localhost
Restart postfix:
/etc/init.d/postfix reload
In case there is undelivered mail from the old hostname, if not required it can be deleted using postsuper -d ALL
TODO: what is the procedure for renaming a Dom0 (nothing special?) and a DomU (at least the DomU's config file, log and autostart link on the Dom0 include the DomU's FQDN).
Reference: Debian WIKI page on changing hostname.
Change the hostname
service hostname restart
If the computer is backed up on bafi, either by push from the computer or pull from bafi:
Not tested (may all be done by the commands 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.
On master DNS servers which have record(s) for the old name, change the forward zone file and any reverse zone file. The DNS servers to consider are:
TODO: when this section is understood, move it or not. It is not clear whether it applies on the computer being renamed (in which case it should be above) or on another computer (in which case it is correctly here).
Change the LDAP client's uri
Change the LDAP Address Book clients
On computers with an /etc/hosts file which has record(s) for the old name, change the record(s).
Update git.bluelightav.org:git:bluelight/bash library/aliases.BL.sh and push