[sudo-users] Problems configuring multiple logservers

Niels Kobschätzki niels at kobschaetzki.net
Fri Jul 14 12:53:50 MDT 2023


Todd C. Miller @ 2023-07-14 08:32 :

> On Fri, 14 Jul 2023 15:50:46 +0200, =?utf-8?q?Niels_Kobsch=C3=A4tzki_via_sudo-u
> sers?= wrote:
>
>> I am trying to add two log_servers to my sudoers:
>>
>> Defaults log_servers = a.b.c.d e.f.g.h
>>
>> When I do that I get an error:
>>
>> /etc/sudoers.d/00_sudo-log:2:39: syntax error
>> Defaults log_servers = a.b.c.d e.f.g.h
>>                                ^~~~~~~~~~~~~~
>>
>> According to the man-page log_servers is a white space-separated list.
>>
>> I get the error on a Debian 11 with sudo 1.9.5 and on a FreeBSD 13 with
>> sudo 1.9.10
>
> Any Defaults value that includes white space needs to be enclosed
> in double quotes or have the space escaped with a backslash.
> For example:
>
> Defaults log_servers = "a.b.c.d e.f.g.h"
>
> or:
>
> Defaults log_servers = a.b.c.d\ e.f.g.h

Thanks a lot. Stupid that I didn´t think about that.

Best,

Niels


More information about the sudo-users mailing list