[Bug 985445] [NEW] visudo doesn't check through files imported into the sudoers file.
AndrewShroom
shroomishness at gmail.com
Thu Apr 19 07:31:05 UTC 2012
Public bug reported:
Linux 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 GNU/Linux
Ubuntu Server 11.10
What Happened:
The file /etc/sudoers contains a line
"import /etc/sudoers.d/*" (or similar)
When invoking visudo to update the sudoers file, visudo only checks the sudoers file itself for errors, and none of the imported files.
So when I placed a file with a syntax error (and the correct permissions) in the sudoers.d folder and ran visudo, it completed with an error, but completed regardless. Every time sudo is issued afterwards it encounters the error and fails.
Thus leaving me unable to fix it without a rescue disk and a reboot, bit of a problem on the headless server it occurred on.
What I Expected to Happen:
The visudo command to parse and check each of the imported files for errors before continuing. If an error is found in an imported file to give a line where the error occurred in the specific file it occurred in, and give an option to cancel the update, edit the offending file and try again, or continue regardless.
** Affects: sudo (Ubuntu)
Importance: Undecided
Status: New
** Tags: sudo sudoers sudoers.d visudo
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/985445
Title:
visudo doesn't check through files imported into the sudoers file.
Status in “sudo” package in Ubuntu:
New
Bug description:
Linux 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 GNU/Linux
Ubuntu Server 11.10
What Happened:
The file /etc/sudoers contains a line
"import /etc/sudoers.d/*" (or similar)
When invoking visudo to update the sudoers file, visudo only checks the sudoers file itself for errors, and none of the imported files.
So when I placed a file with a syntax error (and the correct permissions) in the sudoers.d folder and ran visudo, it completed with an error, but completed regardless. Every time sudo is issued afterwards it encounters the error and fails.
Thus leaving me unable to fix it without a rescue disk and a reboot, bit of a problem on the headless server it occurred on.
What I Expected to Happen:
The visudo command to parse and check each of the imported files for errors before continuing. If an error is found in an imported file to give a line where the error occurred in the specific file it occurred in, and give an option to cancel the update, edit the offending file and try again, or continue regardless.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/985445/+subscriptions
More information about the foundations-bugs
mailing list