Appendix A : Management Operations Using CLI
(I) Edit the /etc/hosts File
You can edit the /etc/hosts
file using the sudo hosts
command.
hosts [options...] -- Command to update the hosts file
options:
add :adds the host to host file
remove :remove the host from the host file
list :lists the host in the host file
example:
add: $ sudo hosts add 1.2.3.4 localhost
remove: $ sudo hosts remove 1.2.3.4 localhost
list: $ sudo hosts (or) sudo hosts list
(II) Change the IP Address of the IMM Transition Tool VM
Perform the following steps to change the IP address of the VM:
-
SSH to the VM.
-
Edit
/etc/netplan/00-installer-config.yaml
file using the below command:$ sudoedit /etc/netplan/00-installer-config.yaml
-
Change the IP, Netmask, Gateway, and DNS fields as per your requirement.
-
Edit netplan configuration using following doc: https://netplan.readthedocs.io/en/latest/examples/
-
Save the file.
-
Reboot the VM using the below command:
sudo reboot
(III) Change the Hostname/Domain name of the IMM Transition Tool VM
Perform the following steps to change the hostname of the VM:
-
SSH to the VM.
-
Run the below command:
sudo hostnamectl <hostname>
Perform the following steps to change the domain name of the VM:
-
SSH to the VM.
-
Run the below command:
sudo hostname --fqdn <FQDN>
(IV) Change the NTP of the IMM Transition Tool VM
Perform the following steps to change the NTP of the VM:
-
SSH to the VM.
-
Edit
/etc/systemd/timesyncd.conf
file using the below command:$ sudoedit /etc/systemd/timesyncd.conf
-
Uncomment and change the value of ‘NTP=’ field.
-
Save the file.
-
Reboot the VM using the below command:
sudo reboot
(V) Change the Admin Password
Perform the following steps to change the password of the admin:
-
SSH to the VM.
-
Run the below command:
sudo passwd admin
-
Enter the new password.
(VI) Self-sign or Renew the SSL Certificates
Perform the following steps to self-sign or renew/reset the HTTPS SSL certificates:
-
SSH to the VM.
-
Run the below command:
ssl_cert
-
ssl_cert show
: Display information about the SSL certificate currently in use. -
ssl_cert renew
: Renew self-signed SSL certificate with a validity of one year. -
ssl_cert reset
: Remove SSL certificate files from the /etc/data/certificates/ directory