Cannot inventory a RedHat Enterprise Linux 5 server with a non-root account

  • 7920921
  • 01-May-2007
  • 26-Apr-2012

Environment

PlateSpin Recon


Situation

When attempting to inventory a RedHat Enterprise Linux 5 Server with a non-root account, the following error occurs:

System.Exception: sudo: sorry, you must have a tty to run sudo

  at PlateSpin.Utility.RemoteExec.SSH.ProcessExecution.a(String A_0, String A_1, IProcessExecutionInfos A_2)
  at PlateSpin.Utility.RemoteExec.SSH.ProcessExecution.RunCmd(IProcessExecutionInfos infos, String command)
  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, StoredCredential credential, String dependencyPath)

Resolution

RedHat Enterprise Linux 5 Server has a new requiretty flag within the /etc/sudoers file.  To resolve this error, users will need to turn off the requiretty flag by completing the following steps:

  1. Edit the /etc/sudoers file. You will see a line like this:

    Defaults     requiretty
  2. Change the above so that it is commented out as follows:

    #Defaults     requiretty
  3. Save the changes to the /etc/sudoers file

Feedback service temporarily unavailable. For content questions or problems, please contact Support.