Reset-Machine-ID(1)

NAME
Reset-Machine-ID - resets the machine identity state

SYNOPSIS
Reset-Machine-ID [-H hostname | - -hostname hostname]
[-M | - -skip-machine-id]
[-S | - -skip-ssh-configuration]
[-K | - -skip-ssh-key-replacement]
[-Z zabbix_server | - -zabbix zabbix_server] [-A | - -install-zabbix-agent]
[- -yes-to-all-i-am-really-sure]
Reset-Machine-ID [-h | - -help]
Reset-Machine-ID [-v | - -version]

DESCRIPTION
Reset-Machine-ID resets the machine identity state, particularly for a cloned VM, to make it appear as a new machine. It performs the following tasks:
•   Reset /etc/machine-id
•   Reset /var/lib/dbus/machine-id (symlink to /etc/machine-id)
•   Reset host ID in Debian Popularity Contest configuration file (if installed)
•   Change hostname, if a new one is provided (--hostname parameter)
•   Provide hardened settings for SSH client and server
•   Create new SSH key pair
The changes are made interactively on request, unless the option --yes-to-all-i-am-really-sure is used.

ARGUMENTS
The following options are available:

-H hostname | - -hostname hostname
    Set the given hostname.

-M | - -skip-machine-id
    Do not reset the machine ID.

-S | - -skip-ssh-configuration
    Do not make SSH configuration changes.

-K | - -skip-ssh-key-replacement
    Do not replace SSH keys.

-Z zabbix_server | - -zabbix zabbix_server
    Configure an already-installed Zabbix Agent for a given Zabbix server.

-A | - -install-zabbix-agent
    Try to install Zabbix Agent, if necessary, when a Zabbix server is given but no Zabbix Agent is installed. This will add the current Zabbix PPA on Debian/Ubuntu/Fedora systems. Note that a Zabbix PPA may not be available for the used distribution! On FreeBSD, the Zabbix Agent is installed from the FreeBSD Ports Collection.

- -yes-to-all-i-am-really-sure
    Create new keys (delete old ones) as well as replace sshd_config and ssh_config without interactively asking for confirmation.

-h | - -help
    Prints the program's command-line parameters and exits.

-v | - -version
    Prints the program version and exits.

EXIT STATUS
The Reset-Machine-ID tool exits with 0 on success, and >0 in case of an error.

EXAMPLES

sudo Reset-Machine-ID

sudo Reset-Machine-ID --yes-to-all-i-am-really-sure

sudo Reset-Machine-ID --hostname dbserver.domain.example

sudo Reset-Machine-ID -H server.domain.example -Z zabbix.domain.example -A

sudo Reset-Machine-ID -H server.domain.example --zabbix zabbix.domain.example --install-zabbix-agent

sudo Reset-Machine-ID --skip-ssh-configuration --skip-ssh-key-replacement

Reset-Machine-ID --version

Reset-Machine-ID --help

SEE ALSO
System-Info(1), System-Maintenance(1)

NOTES
This program is part of System-Tools. The latest version of System-Tools can be found on the System-Tools Homepage at System-Tools Homepage: https://www.nntb.no/~dreibh/system-tools/.

AUTHORS
Thomas Dreibholz, Homepage: https://www.nntb.no/~dreibh