MID Server privileged commands
To discover certain information on a host server, the MID Server must run SSH commands with higher privileges. The platform provides default privileged commands for the MID Server to use and the ability to add additional commands to the system.
|  |
An example of information that requires elevated privileges is information about storage disks on a host server, retrieved with the fdisk -l command. If your system cannot use sudo commands, you must configure the hosts in your network to use one of the other privileged commands. You can configure different privileged commands for different hosts. However, Discovery supports only one privileged command per host.
Important: You can edit supported privileged commands, but do not delete them.
For a list of possible SSH commands requiring root privileges, see SSH credentials.
| Command | Description | ||||||
|---|---|---|---|---|---|---|---|
| sudo | - Host must support the `sudo -S -p | pbrun |
pfexec |
dzdo | - Host must support the `command –v dzdo` command and return the path to dzdo in standard output. - Credentials provided for Discovery must be able to run dzdo <commands>. - Discovery does not support any other `dzdo –` options, but Discovery supports password authentication for dzdo. | Parent Topic:MID Server reference Related topics MID Server system requirements MID Server Configuration Parameter settings and priority MID Server protected records and reserved characters Manually start, stop, and restart a MID Server Set the MID Server JVM memory size Long-running commands with sudoConfigure J2SSH and ServiceNow SSH to prevent long running commands using sudo from failing when the MID Server disconnects. ServiceNow SSH allows probes to run sudo against individual commands or an entire, long-running script. This is also supported for the pbrun and pfexec privileged commands. Sudo for individual commandsYou can run sudo against individual commands within a probe, but only if all the following sudoer configurations are performed on the target:
Note: Running sudo against individual commands with ServiceNow SSH produces detailed and useful entries in the sudo logs on the target computer. Running sudo on an entire scriptIf any of the required sudoer configuration requirements for individual commands is not in place, Discovery applies sudo to the initial and complete probes, and does not execute sudo remotely inside the command. This condition can be forced by setting must_sudo on the probe and eliminating any sudo commands within the probe. This approach prevents long running commands from failing when the probe disconnects, but cannot specify individual commands in the sudoers configuration. LoggingThe logs from ServiceNow SSH sudo activity run against an entire script show cryptic entries, such as Add a new privileged command for use by the MID ServerAdd a new privileged command to the Privileged Command [privileged_command] table that is available to your MID Servers. Before you beginRole required: admin About this taskImportant: Do not delete any of the supported commands. Procedure
Configure the MID Server to use specific privileged commandsYou can configure the MID Server to use specific commands in a defined order. Before you beginRole required: admin Procedure
Image omitted: MIDServerAdvancedView.png Selecting the Advanced view
Image omitted: MIDSelectPrivilegedCommand.png List of privileged commands to use for a MID Server Create a pbrun profile privileged commandYou can create a special configuration for the pbrun privileged command that allows it to run as a profile. Before you beginRole required: discovery_admin, admin About this taskOf all the privileged commands, only the pbrun command can be configured to run as a profile, and only one of these special pbrun configurations can function on a MID Server. Important: Edit the existing pbrun record for this purpose. The system ignores any additional commands you create for pbrun. Procedure
What to do nextReturn to Configuring MID Servers. |