Using Sudo for data collection


 This task describes how to use Sudo for data collection. The PSL can execute only non-root user commands. Some parameter needs to run some command with root privileges. 

To use Sudo on Linux

Note

This menu command is available for local and remote hosts.

  1. Access the Linux OS application menu.
  2. Select Knowledge Module Admin > Use Sudo.

    Sudu properties dialog box will be displayed:
    Sudo.jpg
  3. Select any of the following from the Use Sudo list

    • Sudo is not Configured: You cannot use the Sudo utility, which is the default behavior.
    • Use Sudo without Password: Option to use Sudo utility without passing PATROL user password to the Sudo command.
    • Use Sudo with Password: Option to use Sudo utility with PATROL user password.

To configure the Sudo on a Linux Computer

You can configure Sudo with or without password.

To configure Sudo without password, perform the following steps:oh

  1. Download the Sudo utility from: http://www.sudo.ws/sudo/download.html.
  2. Open the sudoers file with a text editor. Generally, this file is located in the /etc directory.
  3. To use without password option, enter the following line: userName ALL = (ALL) NOPASSWD: ALL

    Note

    The userName variable represents the user for which the PATROL user is configured.

  4. Comment Defaults requiretty as #Defaults requiretty.
  5. Save the sudoers file.
  6. Log off from the monitored server.

To configure Sudo with password, perform the following steps:

  1. Download the Sudo utility from: http://www.sudo.ws/sudo/download.html.
  2. Open the sudoers file with a text editor. Generally, this file is located in the /etc directory.
  3. To use with password option, enter the following line: userName ALL = (ALL): ALL

    Note

    The userName variable represents the user for which the PATROL user is configured.

  4. Comment Defaults requiretty as #Defaults requiretty.

  5. Add Defaults visiblepw.

  6. Save the sudoers file.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*