ERRMSG: Inventory of Linux or Solaris based systems fail with System.Exception: Error occurred during execution of getplatform script. ---> System.Exception: sh: sudo: not found

  • 7921023
  • 24-Jan-2008
  • 29-Apr-2013

Environment

PowerRecon 3.1 and above

Situation

This article discusses an issue which may occur during the PowerRecon inventory process of a UNIX/LINUX based system. When attempting to inventory a UNIX or Linux system using a SUDO account you may receive the error listed below if the path to the SUDO command is not located in /usr/bin/

inventory failed due to:
System.Exception: Error occurred during execution of getplatform script. ---> System.Exception: sh: sudo: not found

  at PlateSpin.Utility.RemoteExec.SSH.ProcessExecution.RunCmd(String command, String baseCommand, IProcessExecutionInfos info)
  at PlateSpin.Utility.RemoteExec.SSH.ProcessExecution.RunCmd(IProcessExecutionInfos infos, String command)
  at PlateSpin.RemoteInventory.Server.RemoteExecution.SSH.InventorySSH.OSVersion(IProcessExecutionInfos infos)
  --- End of inner exception stack trace ---
  at PlateSpin.RemoteInventory.Server.RemoteExecution.SSH.InventorySSH.OSVersion(IProcessExecutionInfos infos)
  at PlateSpin.RemoteInventory.Server.RemoteExecution.SSH.UnixInventory.Start(IProcessExecutionInfos infos)
  at PlateSpin.RemoteInventory.Server.RemoteExecution.LaunchDiscoverySkeleton.Run(Stream script)
  at PlateSpin.RemoteInventory.Server.RemoteExecution.SSH.LaunchDiscovery.Run(Stream script)
  at PlateSpin.RemoteInventory.Server.RemoteInventoryServer.Inventory(String scriptName, String hostname, String dependencyPath, InventoryType inventoryType, InventoryParameters inventoryParameters, Boolean useService, Boolean useServiceIfWMIFailure)

Resolution

During the PowerRecon Inventory process of a UNIX or LINUX based system using a non-root (SUDO) account you may receive the above error message if the SUDO does not reside in /usr/bin/sudo. This may occur if the SUDO package was installed to a non-standard location or installed to /usr/local/bin/sudo.

Resolution

To resolve this issue either create a symbolic link in /usr/bin/ which points to the non-standard location of sudo or reinstall the sudo package to the default location of /usr/bin.

To create a symbolic link use the “ln –s” command.  

Ex. Symbolic Link to /usr/local/sudo command

“ln –s /usr/local/bin/sudo /usr/bin/sudo”