How to properly use sudo in Discovery Probes

Michael Zglesze
Giga Expert

 

Hello Community!

I have previously written many custom Probes using sudo in the Probe Parameter script without any issue, but it seems that I can no longer do that without getting a "Permission Denied" message from the server.  The previous Probes still work without any issue, but any new ones that I create do not.

Here are some observations:

  • I've tried simply executing the command with sudo in the script
  • I've tried using the following in the script: 
    ${sudo:command}​
  • Recently upgraded to New York from London
  • Old Probes work fine with sudo in the script (I didn't use the method in bullet #2)
  • When I use the Test Probe link on the Probe form, IT WORKS!
  • When I execute a Quick Discovery, it does not work.

Anyone have any thoughts as to why this would not be working anymore?

Thank you!

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

you will have to add sudo access for config.xml for a probes.

 

check below also

 

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/product/mid-server/concept/c_Pri...

 

Regards,

Sachin

View solution in original post

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

you will have to add sudo access for config.xml for a probes.

 

check below also

 

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/product/mid-server/concept/c_Pri...

 

Regards,

Sachin

Michael Zglesze
Giga Expert

Thank you, Sachin!  🙂

Let me clarify the solution that he provided and give a better link:

https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/product/mid-server/reference/mid...

For some reason, I had to add the following MID Server Property to get this to work:

mid.ssh.disable_privilege_check = true

Thank you!