[sudo-users] Has anyone successfully modified the default"mailto" string in sudoers file
Galen.Johnson at sas.com
Thu Jan 19 10:27:39 EST 2006
Sounds to me like it's more of a origin problem...origin starts a 0 instead of 1.
From: sudo-users-bounces at courtesan.com [mailto:sudo-users-bounces at courtesan.com] On Behalf Of Stoddard, Kevin M
Sent: Thursday, January 19, 2006 10:12 AM
To: Russell Van Tassell
Cc: sudo-users at sudo.ws
Subject: RE: [sudo-users] Has anyone successfully modified the default"mailto" string in sudoers file
Thank you for your response, Russell... (I'm NOT one of those voices...;-)
After commenting out (#) the 'mailto' line, visudo still complained about
a syntax error on this line. Now, that's just wrong. After some testing,
it turns out visudo is "pointing low when it should be pointing high." As
it turns out, the line after, "Defaults mailto = ...", was incorrect. If
you take the line number the syntax checker gives you and add 1 (one) to it,
you will get the correct line number with the syntax error. Is this a vi
error or an implementation error of vi through visudo? I don't know. I'm a
GNU Emacs user.
SUMMARY: visudo points to the wrong line number when using the -s flag.
This works! -> Host_Alias AIX=192.168.1.1
Defaults mailto="me at AIX"
K. M. Stoddard
"I.S. I.T. M.I.S."
From: Russell Van Tassell [mailto:russell+sudo-users at loosenut.com]
Sent: Wednesday, January 18, 2006 18:21
To: Stoddard, Kevin M
Cc: sudo-users at sudo.ws
Subject: Re: [sudo-users] Has anyone successfully modified the default
"mailto" string in sudoers file
On Wed, Jan 18, 2006 at 11:18:05AM -0700, Stoddard, Kevin M wrote:
> Quoting directly from the, Sudoers Manual, (Copyright 2004 GratiSoft, Inc.)...
> Page 11 - mailto
> Address to send warning and error mail to. [SIC] The address should be enclosed in double quotes (") to protect against sudo interpreting the @ sign. Defaults to root.
> This implies the following form is correct:
> Defaults mailto = "me at hostname"
At work (read: large network with many subnets) we use things such as
the following (names changed to protect the guilty, etc):
Defaults mailsub="*** SECURITY information for CORP-%h ***"
Defaults at PROD mailsub="*** SECURITY information for PROD-%h ***"
Defaults at SUBNET1 mailsub="*** SECURITY information for SUBNET1-%h ***"
Defaults at SUBNET2 mailsub="*** SECURITY information for SUBNET2-%h ***"
Defaults at SUBNET5 mailsub="*** SECURITY information for SUBNET5-%h ***"
...of course, coupled with an even more complicated stanza of HOST_ALIAS
(so, I think you just need to remove the quotes or something?)
Hope that helps...
Russell M. Van Tassell
russell at loosenut.com
"You're just jealous because the voices are talking to me!!"
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
More information about the sudo-users