Table of Contents |
---|
On the computer's host
LXC
TODO: what is the procedure for renaming an LXC? http://www.bonusbits.com/wiki/HowTo:Rename_LXC_Container
Xen
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).
On the computer
All distributions
Cyrus
TBC
LVM
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 ...).
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 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),
Name resolution
/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 ...
- The name change includes a domain name change.
- /etc/resolv.conf is either a local file or includes a local head or tail file.
- The local file(s) include a domain line.
... then any domain line(s) in /etc/resolv.conf{,.head,.tail} may need adjusting.
OpenLDAP
TBC. May involve re-generating certificates.
OpenVPN
Remove any OpenVPN client configuration for the old name: OpenVPN#Ontheclient
The next step is most commonly done on the client but may need to be done partly on the primary OpenVPN server, details in the linked section.
Set up the OpenVPN client under the new name: OpenVPN#Per-clientconfiguration%28serverandclient%29
Postfix
Do not restart or reload postfix until all files have been updated.
Update by editing:
- /etc/
...
- aliases If it is changed, run the
newalises
command. - /etc/
...
- mailname
- /etc
...
then run /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
...
- /postfix/header_checks If the file doesn't exist, create it using the procedure at http://wiki.bluelightav.org/x/PAIW
- /etc/postfix/generic If it is changed, run the
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
Debian
Reference: Debian WIKI page on changing hostname.
Ubuntu
...
Change the hostname
- Edit /etc/hostname
- Edit /etc/hosts
service hostname restart
On other computers
Backup systems
Backed up on bafi
If the computer is backed up on bafi, either by push from the computer or pull from bafi:
- Find which file system it is backed up to and adjust directory name(s) accordingly.
- Adjust directories and symlinks under /var/backup.
DHCP servers
LTSP
- change the domain name in /etc/ltsp/dhcp.conf
Not tested (may all be done by the command 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.
Changes required on other computers
DNS servers
On master DNS servers which have record(s) for the old name, change both the forward zone file and any 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.zone file. The DNS servers to consider are:
- dns2.bluelightav.org for public network addresses.
- openvpn.bluelightav.org for BL OpenVPN network addresses.
- bafi for Town Hall addresses.
LDAP server
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
- edit /etc/ldap.conf
- replace the uri=service.av to the appropriate hostname. Note: if the uri=ldapi:/// or anything else of the kind, leave it
- service slapd restart
Change the LDAP Address Book clients
OpenVPN server
On the primary OpenVPN server, revoke the client under its old name: OpenVPN#Ontheprimaryserver
Miscelaneous computers
/etc/hosts files
On computers with an /etc/hosts file which has record(s) for the old name, change the
...
record(s).
git
ssh aliases
Update git.bluelightav.org:git:bluelight/bash library/aliases.BL.sh and push