[sudo-workers] change the "user is not in sudoers..." message

Joao Pedro Abreu De Souza jp_abreu at id.uff.br
Wed Sep 6 12:04:01 MDT 2017

Sorry, I don't explain correctly.

I knew this file, but don't want to change a hard-coded message to
another hard-coded message, I want to make something like


Defaults lecture_file="..."


I want to write

Defaults outOfSudoers_file="..."

and the message change.

I create the def_data.in entry, and want to put in the code that is
hard-coded, the variable associated with this conf, but I don't found
how to do. Where is the translation between variable in conf and
variable in the code, after the perl script make your job? Sorry if
this is somewhere in the sudo.ws, but i searched and don't found.

2017-09-06 14:29 GMT-03:00 Todd C. Miller <Todd.Miller at courtesan.com>:
> 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

More information about the sudo-workers mailing list