[sudo-users] Has anyone successfully modified the default "mailto" string in sudoers file

Russell Van Tassell russell+sudo-users at loosenut.com
Thu Jan 19 12:25:48 EST 2006

On Thu, Jan 19, 2006 at 08:11:34AM -0700, Stoddard, Kevin M wrote:

> After commenting out (#) the 'mailto' line, visudo still complained about 
> a syntax error on this line.  Now, that's just wrong.
>  [...]
> SUMMARY:  visudo points to the wrong line number when using the -s flag.

As someone else pointed out, because of the way files are tokenized,
you're getting the error at the point the tokenizer file went 'huh?'
Depending on the lines, or what code you're writing, this can often bear
little resemblence to the line where the actual error occurs (things
like quotes and squirrley brackets or other logical delimiters can be
excellent demonstrations of this idea).

The oftenways the simplest way to troubleshoot where the actual fault
may lie is to take a "comment out and test" approach with the tokenizer.
That is, comment out segments of the block(s) you were just working with
and then attempt to compile, test, etc.  Usually the error will become
obvious or, well, you'll finally narrow the offending line dow to the
real line using typical binary sort-like logic to eliminate candidates.

Hope that helps!

Russell M. Van Tassell
russell at loosenut.com

"Can't Sleep.  Clowns Will Eat Me."

More information about the sudo-users mailing list