Re: change the "user is not in sudoers..." message
"Todd C. Miller" <[email protected]> Wed, 06 Sep 2017 11:29:47 -0600
| Newsgroups | gmane.comp.tools.sudo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 06 Sep 2017 14:20:20 -0300, Joao Pedro Abreu De Souza wrote:
> I need to change this message, but there's not conf option to do this.
> This message is hard-coded, so someone can give me some direction on
> which files I need to change besides def_data.in, defaults.c and
> sudoers.c to do this?
Those messages are in the log_denial() function in plugins/sudoers/logging.c.
There are several of them.
For the log messages, it is the following code:
/* Set error message. */
if (ISSET(status, FLAG_NO_USER))
message = _("user NOT in sudoers");
else if (ISSET(status, FLAG_NO_HOST))
message = _("user NOT authorized on host");
else
message = _("command not allowed");
For the message that the user sees, see the block of code
with the comment:
Inform the user if they failed to authenticate (in their locale).
- todd
____________________________________________________________
sudo-workers mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-workers