Avoid Duplicate Configuration with SUDO 1.9
This document (000020389) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Alias "en_GB.UTF-8" already defined
Resolution
- Make sure there are no duplicate Cmnd_Alias
s15sp3:~ # sudo -v s15sp3:~ # cat > /etc/sudoers.d/test <<EOF > Cmnd_Alias KILL = /usr/bin/kill > Cmnd_Alias KILL = /usr/bin/kill > EOF s15sp3:~ # sudo -v /etc/sudoers.d/test:2:37: Alias "en_GB.UTF-8" already defined Cmnd_Alias KILL = /usr/bin/kill ^
- The /etc/sudoers only include the same directory once
s15sp3:~ # sudo -v s15sp3:~ # cat > /etc/sudoers.d/test <<EOF > Cmnd_Alias KILL = /usr/bin/kill > EOF s15sp3:~ # sudo -v s15sp3:~ # tail -3 /etc/sudoers ## Read drop-in files from /etc/sudoers.d @includedir /etc/sudoers.d s15sp3:~ # echo "#includedir /etc/sudoers.d" >> /etc/sudoers s15sp3:~ # tail -3 /etc/sudoers ## Read drop-in files from /etc/sudoers.d @includedir /etc/sudoers.d #includedir /etc/sudoers.d s15sp3:~ # sudo -v /etc/sudoers.d/test:1:37: Alias "en_GB.UTF-8" already defined Cmnd_Alias KILL = /usr/bin/kill ^
Note: To include extra sudoers configuration use @includedir, for old sudo #includedir
Cause
- Duplicate Cmnd_Alias definition
- Bad configuration/Duplicate includedir directive in /etc/sudoers
Additional Information
s15sp2:~ # tail -4 /etc/sudoers ## Read drop-in files from /etc/sudoers.d ## (the '#' here does not indicate a comment) #includedir /etc/sudoers.d
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:000020389
- Creation Date: 16-Sep-2021
- Modified Date:16-Sep-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com