Views:

Logging In to the Linux Machine as "Root" with a SSH Client

Before editing the configuration files, you need to log in to the Linux machine as "root" with a Secure Shell (SSH) client such as PuTTy. By logging in as "root," you can have full access to the system, including editing the configuration files.

Backing Up the Configuration File

The next step is to back up the configuration file you would like to edit in /var/tmp with the command "cp." This step ensures that you have a copy of the original file in case you need to revert to it in the future.

For example:

cp /etc/iscan/intscan.ini /var/tmp

Editing the Configuration File with Vim

After backing up the configuration file, you can edit the file with Vim, a powerful text editor that is available on most Linux systems. To open the file in Vim, run the command "vim."

For example: #vim /etc/iscan/intscan.ini

Once the file is open in Vim, type "/" and then the name of the value you would like to edit and press Enter to search for the value in the file. If more than one instance of the search string was found, you can use "n" to go to the next instance or "?" to go to the previous one.

Search with "/"

Click the image to enlarge.

To enter insert mode, type "i." In insert mode, you can modify the value that you would like to change using the arrow keys on your keyboard.

Modify file in insert mode

Click the image to enlarge.

After you have made the necessary changes, press ESC and then type ":wq!" and press Enter to save the changes and exit Vim. If you would like to exit the file without making any changes, press ESC, then type ":q!" and press Enter.

Save with :wq

Click the image to enlarge.

Copying the Backup Configuration File

If you need to copy the backup intscan.ini file, which has been saved in /var/tmp/, you can follow the procedure below. However, make sure to perform it during out-of-office hours to minimize any impact on the users.

  1. Rename the original intscan.ini file: mv /etc/iscan/intscan.ini /etc/iscan/intscan.ini.bak
  2. Copy the backup file to the original location in /etc/iscan/: mv /var/tmp/intscan.ini /etc/iscan/intscan.ini
  3. Provide the correct permissions to the file: chown iscan:iscan /etc/iscan/intscan.ini
    chmod 664 /etc/iscan/intscan.ini
  4. Restart all the IWSVA daemons to apply the changes you made. However, this will interrupt the network traffic for a few minutes, so plan accordingly.
    To do this, run the command: /etc/iscan/rcIwss restart

Conclusion

In conclusion, editing configuration files of Linux-based products can be a bit daunting, especially if you're not familiar with the command line interface. However, by following the steps outlined in this guide, you can make changes and updates to your system with ease. Remember to always back up your configuration files before making any changes, and to perform any updates during out-of-office hours to minimize any disruption to your users.