Child pages
  • How to rename a computer
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

On the computer

All distributions

Amanda

Change amanda's reference

  • edit /etc/amandahosts
  • replace the line with the previous hostname by the same one but with the new FQDN (hope it is clear)
  • edit /etc/amanda/<config>/disklist
  • replace the entries with the old hostname by the new one

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 ...).  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 ...

  1. The name change includes a domain name change.
  2. /etc/resolv.conf is either a local file or includes a local head or tail file.
  3. 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.

Postfix

Change the postfix configuration files

  • Change the hostname in /etc/mailname
  • (warning) Do not restart or reload postfix until all files have been updated
  • Change the hostname in /etc/postfix/header_checks.  If the file doesn't exist, create it using the procedure at http://wiki.bluelightav.org/x/PAIW 

Update /etc/postfix/generic and /etc/postfix/main.cf by (replacing <hostname> and <domain>):

  • postconf -e myhostname=<hostname>

  • postconf -e mydestination=<hostname>,localhost.<domain>,localhost
  • postconf -e 'smtp_header_checks = regexp:/etc/postfix/header_checks'

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

Amanda

TBC

Backed up on bafi

If the computer is backed up on bafi, either by push from the computer or pull from bafi:

  1. Find which file system it is backed up to and adjust directory name(s) accordingly.
  2. Adjust directories and symlinks under /var/backup.

DHCP servers

LTSP

In case you are running ltsp
  • change the domain name in /etc/ltsp/dhcp.conf

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.

LDAP servers

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

Name resolution

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 record(s).

  • No labels