Child pages
  • How to rename a computer

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

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

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:

  1. /etc/hosts
  2. /etc/HOSTNAME
  3. /etc/NetworkManager/NetworkManager.conf (if it exists)
  4. /etc/rc.d/inet1.conf (if supplying hostname to DHCP server)

then run /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)

...

Postfix

Change the postfix configuration

  • edit /etc/mailname
  • replace the hostname
  • do the same with /etc/postfix/header_checks. It the file doesn't exist check the following JIRA issue: BLUE-689

There will also be references to the old hostname in /etc/postfix/generic and /etc/postfix/main.cf:

  • postconf -e myhostname=<hostname>

  • postconf -e mydestination=<hostname>,localhost.<domain>,localhost

Obvisouly replace <hostname> and <domain> by the appropriate values

Debian

Reference: Debian WIKI page on changing hostname.

Ubuntu

Change the hostname
  • edit /etc/hostname
  • edit /etc/hosts
  • service hostname restart

...

Changes required on other computers

Backup systems

Amanda

TBC

Computer backed up on bafi

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

DHCP

LTSP

In case you are running ltsp

...

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.

 

Change the LDAP client's uri

...

...

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

 

Change the postfix configuration
  • edit /etc/mailname
  • replace the hostname
  • do the same with /etc/postfix/header_checks. It the file doesn't exist check the following JIRA issue: BLUE-689

There will also be references to the old hostname in /etc/postfix/generic and /etc/postfix/main.cf:

  • postconf -e myhostname=<hostname>

  • postconf -e mydestination=<hostname>,localhost.<domain>,localhost

Obvisouly replace <hostname> and <domain> by the appropriate values

 

Change the bind settings

 

Change the LDAP Address Book clients

 

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.

...

On computers with an /etc/hosts file which has record(s) for the old name, change the line.

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