SUSE Support

Here When You Need Us

sudo commands fails with the error "sudo: no valid sudoers sources found, quitting"

This document (000021498) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12

Situation

sudo command fails with the following error
testuser@server1:/root> sudo su -
sudo: no valid sudoers sources found, quitting
sudo: error initializing audit plugin sudoers_audit

Resolution

Review and correct the /etc/nsswitch.conf file, in relation to the "sudoers" line.  See the "Cause" section for more details.

Cause

The value for sudoers parameter in /etc/nsswitch.conf was set to ldap, while the server did not have any LDAP users. 
# /etc/nsswitch.conf
passwd: files nis
shadow: files nis
group:  files nis
passwd: files ldap
shadow: files ldap
group:  files ldap
sudoers: ldap           #<---------------
hosts:          files ldap dns
networks:       files dns
services:       files ldap
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       ldap
publickey:      files
bootparams:     files
automount:      files
aliases:        files
Removing the "sudoers" line resolved the issue.  Generally speaking, if the sudoers are local, then the default configuration should not have been changed to point elsewhere.

Additional Information

For more information about the filesystem check commands, please refer to the following: 
  • man sudo
  • man nsswitch.conf 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021498
  • Creation Date: 15-Jul-2024
  • Modified Date:23-Jul-2024
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.