Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
SSH sudo command error "User has no right to run command under sudo" - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • SSH sudo command error "User has no right to run command under sudo"
KB0712620

SSH sudo command error "User has no right to run command under sudo"


6213 Views Last updated : Jul 24, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

Sudo commands will fail with Permission denied or No credential found for types [SSH Password,SSH Private Key]. Discovery logs will contain warnings like:

User has no right to run command under sudo


Release

All releases.

Cause

Some commands require sudo privileges to run. Some systems are configured to notify the admin team when a user attempts to use sudo but is not allowed to. The MID server checks if such user is allowed to use sudo with a command before the ssh commands is executed. A couple of reasons this error could be seen are:

  • User is not configured to run sudo -l on the target, thus the MID server cannot determine what commands the user is allowed to run
  • Command is not allowed for user given sudoers file configuration

Note: Some probes include script files. Check that such files are OOB. 

Resolution

Possible solutions:

  • Provide proper permissions for the Discovery user to run sudo -l command
  • Update sudoers configuration to allow user to run command
  • Add the mid server property "mid.ssh.disable_privilege_check" = true to disable privilege check
    • sudo will be added to the command regardless of the result from sudo -l when this property is set to true
    • However, user must still be able to run "sudo -l" successfully

Related Links

  • SSH Privileged Commands

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.