How to set the path of the sudo command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2015 08:40 AM
How do you set the path to the sudo command?
I am trying to run discovery on Solaris 10 targets and the sudo command is not in the ServiceNow paths. As far as i could see adding the path_override variable or setting PATH in .profile doesn't work. The command i am trying to run is an ECC one liner.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2015 01:49 AM
It should first set the path, and then it should do must_sudo imho. I was thinking the same what you mentioned in point 6 ie creating s-link. To tighten this, we can allow only srvc_user to x this link. Another thing that you can do is to use complete path instead of relying on must_sudo. But that seems to be lengthy. Also, you are using ksh which is not officially supported. I suggest to change this to bash. Last, set default path to include /usr/local/bin/ in /etc/environment or its equivalent in solaris and export to get immediate results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2015 02:47 AM
Thank you for your suggestions. As always with unix systems there are different ways to get something done.
As for ServiceNow , i hope in the future they will change the behavior of the path_override parameter and the must_sudo parameter so that they will work nicely together.
I did notice in some of my tests that if I remove must_sudo and just add the full path of the sudo command ServiceNow does some weird things and doesn't behave as you would expect, but that can be another thread if i have time to do a full trace of the problem.