[Bug 1741398] Re: Commented line in sudoers file breaks sudo
Marc Deslauriers
marc.deslauriers at canonical.com
Fri Jan 5 12:21:17 UTC 2018
Hi, Thanks for reporting this issue, but that is not a comment at all.
>From the sudoers man page:
It is possible to include other sudoers files from within the sudoers
file currently being parsed using the #include and #includedir direcā
tives.
While # is used in some applications to indicate the start of a comment,
it is not the case in the sudoers file. It's also not the case in other
situations too, for example, in a C file.
I am closing this bug.
** Changed in: sudo (Ubuntu)
Status: New => Invalid
--
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/1741398
Title:
Commented line in sudoers file breaks sudo
Status in sudo package in Ubuntu:
Invalid
Bug description:
Ubuntu 16.04 Amazon AWS image.
sudo:
Installed: 1.8.16-0ubuntu1.5
Used sudo visudo to edit /etc/sudoers file from the ubutntu admin user
At the bottom of the file is a line
#includedir /etc/sudoers.d
I added a couple of lines at the end of the file to give permissions
to another user. I accidentally hit backspace and altered the
includedir line so it looked like this
#includedir /etc/sudoercs
I couldn't remember what the actual directory was at the time, but I
thought, hey, its a commented line, it doesn't matter anyway. I was
wrong.
So visudo saved the file OK, but from then on, no valid sudo commands
would work for any user. Including sudo visudo of course. Its an AWS
instance, so no root login. Only recourse was to detach the volume,
re-attach it to another instance, fix the spelling mistake.
So obviously sudo freaked when the directory given didn't exist. But
why would it, if the line is a comment? Something obviously wrong
here. And given the lack of root, a particularly irritating and time
consuming one.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1741398/+subscriptions
More information about the foundations-bugs
mailing list