SUDO_LOGSRVD.CONF(5)

๐Ÿ“ฆ
version 1.9.17_p2 ยท 8 versions
, in alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ“œ NAME ๐Ÿ“œ

Okay bestie, so the manual name here is SUDO_LOGSRVD.CONF(5), from the File Formats Manual ๐Ÿ“‚. It's all about sudo_logsrvd.conf, the config file for sudo_logsrvd ๐Ÿฆ‹


๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so the sudo_logsrvd.conf file is how you configure the sudo_logsrvd log server ๐Ÿ’– It uses an INI-style format, which means sections wrapped in square brackets, with key = value pairs underneath each section name. Depending on the key, values can be integers, booleans, or strings ๐ŸŽ€ Section and key names are not case sensitive, but values are ๐Ÿ‘€ So be careful with your capitals, bestie!

The pound sign (#) marks a comment โœจ Both the # and anything after it, all the way to the end of the line, get ignored. Lines starting with a semicolon (;) get ignored too ๐Ÿ™ˆ

Got a super long line? You can continue it onto the next line by putting a backslash (\) as the very last character ๐Ÿงš Leading white space gets stripped from the start of lines even when you use the continuation character, so don't stress about indenting ๐Ÿ’…

The "EXAMPLES" section has a copy of the default sudo_logsrvd.conf file, so you can peek at it ๐Ÿ“

These are the configuration sections that are recognized ๐Ÿ‘‘

  • server
  • relay
  • iolog
  • eventlog
  • syslog
  • logfile

Each section gets its own deep dive below ๐Ÿ’œ


๐Ÿ–ฅ๏ธ server

The server section is where you set the address and port the server listens on ๐Ÿฆ‹ These are the keys it recognizes:

  • listen_address = host[:port][(tls)] โ€” the host name or IP address, an optional port to listen on, and an optional Transport Layer Security (TLS) flag in parentheses ๐Ÿ’–

The host can be a host name, an IPv4 address, an IPv6 address wrapped in square brackets, or the wild card * โœจ Setting the host to * tells sudo_logsrvd to listen on all configured network interfaces ๐ŸŒˆ

If you include the optional tls flag, sudo_logsrvd will secure the connection with TLS version 1.2 or 1.3 ๐Ÿ” Versions of TLS older than 1.2 are not supported, so don't even try ๐Ÿ’€ See sudo_logsrvd(8) for details on generating TLS keys and certificates ๐ŸŽ€

If you specify a port, it can be either a port number or a known service name from the system's service name database ๐ŸŒท If you don't specify a port, port 30343 is used for plaintext connections and port 30344 is used for TLS connections ๐Ÿซถ

The default value is:

listen_address = *:30343
listen_address = *:30344(tls)

That listens on all configured network interfaces for both plaintext and TLS connections, so it's giving full coverage ๐ŸŒ You can add multiple listen_address lines to listen on more than one port or interface ๐Ÿ”ฅ

  • server_log = string โ€” where to log server warning and error messages ๐Ÿ“ Supported values are none, stderr, syslog, or a path name starting with the / character ๐Ÿ’… The stderr value only works when you pair it with the -n option ๐Ÿ™ˆ The default is syslog โœจ
  • pid_file = path โ€” the path to the file holding the process ID of the running sudo_logsrvd ๐Ÿชช If you set it to an empty value, or you run sudo_logsrvd with the -n option, no pid_file gets created ๐Ÿ™…โ€โ™€๏ธ If pid_file points to a symbolic link, it gets ignored ๐Ÿ”— The default value is /run/sudo/sudo_logsrvd.pid ๐Ÿ’œ
  • tcp_keepalive = boolean โ€” if true, sudo_logsrvd turns on the TCP keepalive socket option for the client connection ๐Ÿ’“ That means it periodically sends keepalive messages to the client ๐Ÿ“ก If the client doesn't respond in time, the connection gets closed ๐Ÿ’€ This defaults to true ๐ŸŒธ
  • timeout = number โ€” how long, in seconds, sudo_logsrvd waits for the client to respond โฐ A value of 0 disables the timeout entirely ๐Ÿ™ƒ The default is 30 ๐ŸŽ€
  • tls_cacert = path โ€” the path to a certificate authority bundle file in PEM format ๐Ÿ“œ It gets used instead of the system's default certificate authority database when authenticating clients ๐Ÿ” By default it uses /etc/ssl/sudo/cacert.pem if that file exists ๐Ÿซง Otherwise it falls back to the system's default certificate authority database ๐Ÿช„
  • tls_cert = path โ€” the path to the server's certificate file, in PEM format ๐Ÿชช The default is /etc/ssl/sudo/certs/logsrvd_cert.pem ๐Ÿ’–
  • tls_checkpeer = bool โ€” if true, sudo_logsrvd validates client certificates, and clients without a valid certificate can't connect ๐Ÿšซ If false, no client certificate validation happens at all ๐Ÿ™…โ€โ™€๏ธ If client certificates were made with a private certificate authority, then tls_cacert must be set to a CA bundle that contains the CA certificate used to generate the client certificate ๐Ÿ”‘ The default is false ๐ŸŒท
  • tls_ciphers_v12 = string โ€” a list of ciphers for connections secured by TLS version 1.2 only, separated by a colon : ๐Ÿ” Check the "CIPHER LIST FORMAT" section in openssl-ciphers(1) for the full details ๐Ÿ“– The default is "HIGH:!aNULL", which covers cipher suites with key lengths bigger than 128 bits, plus some cipher suites with 128-bit keys ๐Ÿ’ช Cipher suites that offer no authentication are excluded ๐Ÿšซ
  • tls_ciphers_v13 = string โ€” a list of ciphers for connections secured by TLS version 1.3 only, separated by a colon : ๐ŸŒˆ Which cipher suites are supported depends on the version of OpenSSL you're using, but it should include the following ๐Ÿ‘‡
TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_128_CCM_SHA256
TLS_AES_128_CCM_8_SHA256

The default cipher suite is "TLS_AES_256_GCM_SHA384" โœจ

  • tls_dhparams = path โ€” the path to a file with custom Diffie-Hellman parameters in PEM format ๐Ÿงช You can make that file with this command ๐Ÿ‘‡
openssl dhparam -out /etc/sudo_logsrvd_dhparams.pem 2048

By default, sudo_logsrvd uses the OpenSSL defaults for Diffie-Hellman key generation ๐Ÿฆ‹

  • tls_key = path โ€” the path to the server's private key file, in PEM format ๐Ÿ—๏ธ The default value is /etc/ssl/sudo/private/logsrvd_key.pem ๐Ÿ”’
  • tls_verify = bool โ€” if true, sudo_logsrvd validates its own certificate at startup or whenever the configuration changes ๐Ÿ” If false, the server certificate doesn't get verified at all ๐Ÿ™…โ€โ™€๏ธ If you're using self-signed certificates without a certificate authority, set this to false ๐ŸŽ€ The default is true ๐Ÿ’…

๐Ÿ” relay

The relay section configures the optional logsrv relay host and port that the server connects to ๐Ÿš€ The TLS configuration keys in here are optional. By default, the matching keys in the server section get used instead ๐Ÿซถ They only live in this section so the relay connection can use a different set of TLS parameters than the client-facing server ๐ŸŒˆ These are the keys it recognizes:

  • connect_timeout = number โ€” how long, in seconds, sudo_logsrvd waits for the connection to a relay_host (more on that below) to finish โณ Once connected, the timeout setting takes over and controls how long sudo_logsrvd waits for the relay to respond ๐Ÿ•ฐ๏ธ A value of 0 disables the timeout ๐Ÿ™ƒ The default is 30 ๐Ÿ’–
  • relay_dir = path โ€” the directory where log messages get stored temporarily before they're sent to the relay host ๐Ÿ“‚ Messages are stored in the wire format specified by sudo_logsrv.proto(5) ๐Ÿ“ก The default value is /var/log/sudo_logsrvd ๐ŸŒท
  • relay_host = host[:port][(tls)] โ€” the relay host name or IP address, an optional port to connect to, and an optional Transport Layer Security (TLS) flag in parentheses ๐Ÿ›ฐ๏ธ The syntax matches listen_address in the server section with one exception: the wild card * is not supported here ๐Ÿ™…โ€โ™€๏ธ

When this is enabled, messages from the client get forwarded to one of the specified relay hosts instead of being stored locally ๐Ÿฆ‹ The host can be running an instance of sudo_logsrvd, or another server that supports the sudo_logsrv.proto(5) protocol ๐Ÿงš

If you specify multiple relay_host lines, the first available relay host gets used ๐Ÿฅ‡

  • retry_interval = number โ€” the number of seconds to wait after a connection error before trying again to forward a message to a relay host ๐Ÿ”„ The default is 30 ๐ŸŽ€
  • store_first = boolean โ€” if true, sudo_logsrvd stores logs locally before relaying them ๐Ÿ“ฆ Once a log is complete, a connection to the relay host is opened and the log gets relayed ๐Ÿ’Œ If the network connection drops before the log is fully transferred, it gets retransmitted later ๐Ÿ” The default is to relay logs in real-time โšก
  • tcp_keepalive = boolean โ€” if true, sudo_logsrvd turns on the TCP keepalive socket option for the relay connection ๐Ÿ’“ That means periodic keepalive messages get sent to the relay server ๐Ÿ“ก If the relay doesn't respond in time, the connection gets closed ๐Ÿ’€
  • timeout = number โ€” how long, in seconds, sudo_logsrvd waits for the relay server to respond after a connection succeeds โฐ A value of 0 disables the timeout ๐Ÿ™ƒ The default is 30 ๐ŸŒธ
  • tls_cacert = path โ€” the path to a certificate authority bundle file in PEM format ๐Ÿ“œ It gets used instead of the system's default certificate authority database when authenticating clients ๐Ÿ” The default is to use whatever value is set in the server section, or the system's default certificate authority database if nothing is set there ๐Ÿซง
  • tls_cert = path โ€” the path to the server's certificate file, in PEM format ๐Ÿชช The default is to use the value set in the server section ๐Ÿ’–
  • tls_checkpeer = bool โ€” if true, sudo_logsrvd validates the relay host's certificate, and connections to a relay without a valid certificate will fail ๐Ÿšซ If false, no validation of relay certificates happens ๐Ÿ™…โ€โ™€๏ธ If relay certificates were made with a private certificate authority, then tls_cacert must be set to a CA bundle containing the CA certificate used to generate the relay certificate ๐Ÿ”‘ The default is to use the value set in the server section ๐ŸŒท
  • tls_ciphers_v12 = string โ€” ๐ŸŽ€ okay so this is the list of ciphers for connections secured by only TLS 1.2, separated by a colon : ๐Ÿ’… For the full tea on the format, check the "CIPHER LIST FORMAT" section in openssl-ciphers(1) โœจ If you don't set it, it just uses whatever the "server" section says ๐Ÿซถ
  • tls_ciphers_v13 = string โ€” the same vibe but for only TLS 1.3 connections ๐Ÿฆ‹ Again, separate the ciphers with a colon : ๐ŸŒธ Which cipher suites are supported depends on the version of OpenSSL being used, so peep the "server" section for more info ๐Ÿ’œ Default is to use the value from the "server" section ๐ŸŒˆ
  • tls_dhparams = path โ€” ๐Ÿงš the path to a file with custom Diffie-Hellman parameters in PEM format ๐Ÿ’– If you don't set one, you get the value from the "server" section ๐Ÿ’…
  • tls_key = path โ€” the path to the server's private key file, in PEM format ๐Ÿ”ฅ Default is the "server" section's value ๐Ÿซถ
  • tls_verify = bool โ€” ๐Ÿ‘‘ if this is true, the server certificate that's used for relaying gets verified at startup โœจ If it's false, nothing gets verified ๐Ÿ™ˆ Heads up bestie: if you're using self-signed certificates with no certificate authority, this should be set to false ๐Ÿ’€ Default is to use the "server" section's value ๐Ÿ’œ

๐ŸŽ€ iolog

The iolog section configures I/O log parameters โœจ These settings are identical to the I/O configuration in sudoers(5) ๐Ÿซถ Here are the keys it recognizes:

  • iolog_compress = boolean โ€” ๐Ÿ—œ๏ธ if set, I/O logs get compressed using zlib ๐Ÿ’… Heads up, compression can make it harder to watch the logs in real-time while the program is running, since it's buffered ๐Ÿ™ˆ Default value is false
  • iolog_dir = path โ€” the top-level directory used when building the path name for the I/O log directory ๐Ÿ“‚ The session sequence number, if there is one, gets stored in that directory ๐Ÿ’– Default value is /var/log/sudo-io ๐ŸŒธ

These percent (%) escape sequences are supported, bestie ๐Ÿ’…

  • %{seq} โ€” expands to a monotonically increasing base-36 sequence number, like 0100A5, where every two digits form a new directory, e.g., 01/00/A5 ๐Ÿฆ‹
  • %{user} โ€” expands to the invoking user's login name ๐Ÿงš
  • %{group} โ€” expands to the name of the invoking user's real group-ID ๐ŸŽ€
  • %{runas_user} โ€” expands to the login name of the user the command will run as (e.g., root) ๐Ÿ‘‘
  • %{runas_group} โ€” expands to the group name of the user the command will run as (e.g., wheel) ๐ŸŒˆ
  • %{hostname} โ€” expands to the local host name without the domain name ๐Ÿ“
  • %{command} โ€” expands to the base name of the command being run โญ

Also, any escape sequences the system's strftime(3) function supports will get expanded too โœจ If you want a literal % character, use %% ๐Ÿ’…

  • iolog_file = path โ€” the path name, relative to iolog_dir, where I/O logs get stored ๐Ÿ“ It's totally possible for iolog_file to have directory components ๐Ÿซถ Default value is "%{seq}" ๐Ÿ’œ

Check the iolog_dir setting above for the full list of supported percent (%) escape sequences ๐Ÿ”ฅ

On top of the escape sequences, path names that end in six or more Xs get those Xs replaced with a unique mix of digits and letters, kinda like the mktemp(3) function ๐Ÿฆ‹

โš ๏ธ If the path made by smooshing iolog_dir and iolog_file together already exists, the existing I/O log file gets truncated and overwritten, unless iolog_file ends in six or more Xs. Watch out!! ๐Ÿ˜ญ
  • iolog_flush = boolean โ€” if set, I/O log data gets flushed to disk after every write instead of being buffered ๐ŸŒŠ This lets you watch the logs in real-time while the program runs ๐Ÿ‘€ But it may seriously lower how effective I/O log compression is ๐Ÿ’€ I/O logs are always flushed before a commit point gets sent to the client, no matter what this setting says ๐Ÿซถ Default value is true โœจ
  • iolog_group = name โ€” the group name to look up when setting the group-ID on new I/O log files and directories ๐Ÿง If iolog_group isn't set, the primary group-ID of the user specified by iolog_user gets used ๐ŸŽ€ If neither iolog_group nor iolog_user is set, I/O log files and directories are created with group-ID 0 ๐Ÿ’œ
  • iolog_mode = mode โ€” the file mode to use when creating I/O log files ๐Ÿ” Only the read and write permission bits for owner, group, or other are honored, everything else gets ignored ๐Ÿ™…โ€โ™€๏ธ The file permissions will always include the owner read and write bits, even if they're not in the mode you specified ๐Ÿซถ When creating I/O log directories, search (execute) bits get added to match the read and write bits from iolog_mode ๐Ÿ“‚ Default value is 0600 ๐ŸŒธ
  • iolog_user = name โ€” the user name to look up when setting the owner of new I/O log files and directories ๐Ÿ‘‘ If iolog_group is set, that gets used instead of the user's primary group-ID โœจ By default, I/O log files and directories are created with user and group-ID 0 ๐Ÿ’…
  • log_passwords = bool โ€” most programs that ask for a password turn off echo before reading it, so the plaintext doesn't show up on screen ๐Ÿ™ˆ But if terminal input is being logged, the password will still end up in the I/O log ๐Ÿ’€ If log_passwords is set to false, sudo_logsrvd will try to stop passwords from being logged ๐Ÿ”ฅ It does this by using the regular expressions in passprompt_regex to match a password prompt in the terminal output buffer ๐Ÿ” When a match is found, input characters in the I/O log get replaced with * until either a line feed or carriage return shows up in the terminal input, or a new terminal output buffer comes in ๐Ÿฆ‹ Now, if a program shows characters as the user types them (like sudo when the pwfeedback option is set), only the first character of the password gets replaced in the I/O log ๐Ÿ˜ญ Default value is true ๐Ÿ’–
  • maxseq = number โ€” the maximum sequence number that will be substituted for the "%{seq}" escape in the I/O log file (see the iolog_dir description above for more deets) ๐Ÿ”ข The value substituted for "%{seq}" is in base 36, but maxseq itself should be written in decimal ๐Ÿง  Values bigger than 2176782336 (which corresponds to the base 36 sequence number ZZZZZZ) get silently truncated to 2176782336 ๐Ÿคซ Default value is 2176782336 ๐ŸŒˆ
  • passprompt_regex = string โ€” one or more POSIX extended regular expressions used to match password prompts in the terminal output when log_passwords is disabled ๐Ÿ” As an extension, if the regular expression begins with "(?i)", it gets matched case-insensitively ๐Ÿซถ You can set multiple passprompt_regex settings โœจ Each regular expression is limited to 1024 characters ๐Ÿ“ Default value is "[Pp]assword[: ]*" ๐Ÿ’œ

๐Ÿ“œ eventlog

The eventlog section configures how (and if) security policy events get logged ๐Ÿ‘€

  • log_type = string โ€” where to log accept, reject, and alert events reported by the policy ๐Ÿ“ Supported values are syslog, logfile, and none ๐Ÿซถ Default value is syslog ๐ŸŒธ
  • log_exit = boolean โ€” if true, sudo_logsrvd will log an event when a command exits or gets terminated by a signal ๐Ÿšช Defaults to false ๐Ÿ’…
  • log_format = string โ€” the event log format ๐ŸŽ€ Supported log formats are:
    • json โ€” currently this is an alias for json_pretty ๐Ÿง In a future version of sudo_logsrvd, json will be equivalent to json_compact ๐Ÿ”ฎ JSON log entries contain the full contents of the accept, reject, exit and alert messages ๐Ÿ’–
    • json_compact โ€” logs events in "compact" (minified) JSON format ๐Ÿ“ฆ Each event is written as its own JSON object on a single line, with no extra white space ๐Ÿค Due to limitations of the protocol, JSON events sent via syslog may get truncated ๐Ÿ’€
    • json_pretty โ€” logs events in "pretty" JSON format ๐ŸŒท When logging to a file, the entire file is treated as one single JSON object made of multiple events, each event spanning multiple lines ๐Ÿ“„ When logging via syslog, there's no difference between json_pretty and json_compact ๐Ÿซถ
    • sudo โ€” logs events in the traditional sudo-style log format ๐Ÿฆ‹ See the EVENT LOGGING section in sudoers(5) for the details ๐Ÿ“–

Default value is sudo โœจ


๐Ÿงš syslog

The syslog section configures how events get logged via syslog(3) ๐Ÿ’Œ

  • facility = string โ€” the syslog facility, if syslog is being used for logging ๐Ÿท๏ธ Defaults to authpriv ๐Ÿ’…

These syslog facilities are supported: authpriv (if your OS supports it), auth, daemon, user, local0, local1, local2, local3, local4, local5, local6, and local7 ๐ŸŒˆ

  • accept_priority = string โ€” the syslog priority to use when the user is allowed to run a command and authentication is successful โœ… Defaults to notice ๐Ÿ’–

These syslog priorities are supported: alert, crit, debug, emerg, err, info, notice, warning, and none ๐Ÿ“‹ Setting it to none disables logging of successful commands ๐Ÿ™ˆ

  • reject_priority = string โ€” the syslog priority to use when the user isn't allowed to run a command, or when authentication is unsuccessful ๐Ÿšซ Defaults to alert ๐Ÿšจ

See accept_priority for the list of supported syslog priorities ๐Ÿซถ

  • alert_priority = string โ€” the syslog priority to use for event log alert messages received from the client ๐Ÿ”” Defaults to alert ๐Ÿ”ฅ

See accept_priority for the list of supported syslog priorities ๐Ÿ’œ

  • maxlen = number โ€” on many systems, syslog(3) has a pretty small log buffer ๐Ÿชฃ IETF RFC 5424 says syslog servers must support messages of at least 480 bytes and should support messages up to 2048 bytes ๐Ÿ“œ By default, sudo_logsrvd creates log messages up to 960 bytes ๐ŸŒธ That corresponds to the historic BSD syslog implementation, which used a 1024 byte buffer to store the message, date, hostname, and program name ๐Ÿฆ‹

To keep syslog messages from getting chopped off, sudo_logsrvd will split up sudo-style log messages that are bigger than maxlen bytes. ๐Ÿงท When a message gets split, the extra parts include the string โ€œ(command continued)โ€ right after the user name and before the rest of the command line arguments. JSON-format log entries are never split and aren't affected by maxlen at all, so they're totally safe ๐Ÿ’–

  • server_facility = string โ€” This is the syslog facility used for server warning messages, if syslog is being used. The supported facilities are listed above ๐Ÿ“š If you don't set it, it defaults to daemon ๐Ÿงš

โœจ logfile โœจ

okay so the logfile section is all about settings for logging to a plain file instead of syslog ๐Ÿ“„ no syslog vibes here, just a regular file ๐ŸŽ€

  • path = string โ€” This is the path to the file-based event log ๐Ÿ“ It has to be fully-qualified and start with a / character, no exceptions bestie ๐Ÿ™…โ€โ™€๏ธ If you don't set it, the default is /var/log/sudo.log ๐ŸŒธ
  • time_format = string โ€” This is the string used when formatting the date and time for file-based event logs โฐ It gets formatted with the system's strftime(3) function, so any escape sequences that function supports will get expanded ๐Ÿฆ‹ The default is %h %e %T, which gives you dates like โ€œOct 3 07:15:24โ€ in the โ€˜Cโ€™ locale โœจ

๐Ÿ—‚๏ธ FILES ๐Ÿ—‚๏ธ

  • /etc/sudo_logsrvd.conf โ€” the Sudo log server configuration file, the main home base for all of this ๐Ÿ’œ

โœจ EXAMPLES โœจ

okay so here's the whole sample config, bestie ๐ŸŽ€ it's a real sudo_logsrvd daemon setup, and every section ([server], [relay], [iolog], [eventlog], [syslog], [logfile]) is in there with its comments. Most of the lines are commented out with #, so they're just showing you the defaults and what you could set. ๐Ÿ’…

#
# sudo logsrv daemon configuration
#

[server]
# The host name or IP address and port to listen on with an optional TLS
# flag.  If no port is specified, port 30343 will be used for plaintext
# connections and port 30344 will be used to TLS connections.
# The following forms are accepted:
#   listen_address = hostname(tls)
#   listen_address = hostname:port(tls)
#   listen_address = IPv4_address(tls)
#   listen_address = IPv4_address:port(tls)
#   listen_address = [IPv6_address](tls)
#   listen_address = [IPv6_address]:port(tls)
#
# The (tls) suffix should be omitted for plaintext connections.
#
# Multiple listen_address settings may be specified.
# The default is to listen on all addresses.
#listen_address = *:30343
#listen_address = *:30344(tls)

# The file containing the ID of the running sudo_logsrvd process.
#pid_file = /run/sudo/sudo_logsrvd.pid

# Where to log server warnings: none, stderr, syslog, or a path name.
#server_log = syslog

# If true, enable the SO_KEEPALIVE socket option on client connections.
# Defaults to true.
#tcp_keepalive = true

# The amount of time, in seconds, the server will wait for the client to
# respond.  A value of 0 will disable the timeout.  The default value is 30.
#timeout = 30

# If true, the server will validate its own certificate at startup.
# Defaults to true.
#tls_verify = true

# If true, client certificates will be validated by the server;
# clients without a valid certificate will be unable to connect.
# By default, client certs are not checked.
#tls_checkpeer = false

# Path to a certificate authority bundle file in PEM format to use
# instead of the system's default certificate authority database.
#tls_cacert = /etc/ssl/sudo/cacert.pem

# Path to the server's certificate file in PEM format.
# Required for TLS connections.
#tls_cert = /etc/ssl/sudo/certs/logsrvd_cert.pem

# Path to the server's private key file in PEM format.
# Required for TLS connections.
#tls_key = /etc/ssl/sudo/private/logsrvd_key.pem

# TLS cipher list (see "CIPHER LIST FORMAT" in the openssl-ciphers manual).
# This setting is only effective if the negotiated protocol is TLS version
# 1.2.  The default cipher list is HIGH:!aNULL.
#tls_ciphers_v12 = HIGH:!aNULL

# TLS cipher list if the negotiated protocol is TLS version 1.3.
# The default cipher list is TLS_AES_256_GCM_SHA384.
#tls_ciphers_v13 = TLS_AES_256_GCM_SHA384

# Path to the Diffie-Hellman parameter file in PEM format.
# If not set, the server will use the OpenSSL defaults.
#tls_dhparams = /etc/ssl/sudo/logsrvd_dhparams.pem

[relay]
# The host name or IP address and port to send logs to in relay mode.
# The syntax is identical to listen_address with the exception of
# the wild card ('*') syntax.  When this setting is enabled, logs will
# be relayed to the specified host instead of being stored locally.
# This setting is not enabled by default.
#relay_host = relayhost.dom.ain
#relay_host = relayhost.dom.ain(tls)

# The amount of time, in seconds, the server will wait for a connection
# to the relay server to complete.  A value of 0 will disable the timeout.
# The default value is 30.
#connect_timeout = 30

# The directory to store messages in before they are sent to the relay.
# Messages are stored in wire format.
# The default value is /var/log/sudo_logsrvd.
#relay_dir = /var/log/sudo_logsrvd

# The number of seconds to wait after a connection error before
# making a new attempt to forward a message to a relay host.
# The default value is 30.
#retry_interval = 30

# Whether to store the log before relaying it.  If true, enable store
# and forward mode.  If false, the client connection is immediately
# relayed.  Defaults to false.
#store_first = true

# If true, enable the SO_KEEPALIVE socket option on relay connections.
# Defaults to true.
#tcp_keepalive = true

# The amount of time, in seconds, the server will wait for the relay to
# respond.  A value of 0 will disable the timeout.  The default value is 30.
#timeout = 30

# If true, the server's relay certificate will be verified at startup.
# The default is to use the value in the [server] section.
#tls_verify = true

# Whether to verify the relay's certificate for TLS connections.
# The default is to use the value in the [server] section.
#tls_checkpeer = false

# Path to a certificate authority bundle file in PEM format to use
# instead of the system's default certificate authority database.
# The default is to use the value in the [server] section.
#tls_cacert = /etc/ssl/sudo/cacert.pem

# Path to the server's certificate file in PEM format.
# The default is to use the certificate in the [server] section.
#tls_cert = /etc/ssl/sudo/certs/logsrvd_cert.pem

# Path to the server's private key file in PEM format.
# The default is to use the key in the [server] section.
#tls_key = /etc/ssl/sudo/private/logsrvd_key.pem

# TLS cipher list (see "CIPHER LIST FORMAT" in the openssl-ciphers manual).
# this setting is only effective if the negotiated protocol is TLS version
# 1.2.  The default is to use the value in the [server] section.
#tls_ciphers_v12 = HIGH:!aNULL

# TLS cipher list if the negotiated protocol is TLS version 1.3.
# The default is to use the value in the [server] section.
#tls_ciphers_v13 = TLS_AES_256_GCM_SHA384

# Path to the Diffie-Hellman parameter file in PEM format.
# The default is to use the value in the [server] section.
#tls_dhparams = /etc/ssl/sudo/logsrvd_dhparams.pem

[iolog]
# The top-level directory to use when constructing the path name for the
# I/O log directory.  The session sequence number, if any, is stored here.
#iolog_dir = /var/log/sudo-io

# The path name, relative to iolog_dir, in which to store I/O logs.
# It is possible for iolog_file to contain directory components.
#iolog_file = %{seq}

# If set, I/O logs will be compressed using zlib.  Enabling compression can
# make it harder to view the logs in real-time as the program is executing.
#iolog_compress = false

# If set, I/O log data is flushed to disk after each write instead of
# buffering it.  This makes it possible to view the logs in real-time
# as the program is executing but reduces the effectiveness of compression.
#iolog_flush = true

# The group to use when creating new I/O log files and directories.
# If iolog_group is not set, the primary group-ID of the user specified
# by iolog_user is used.  If neither iolog_group nor iolog_user
# are set, I/O log files and directories are created with group-ID 0.
#iolog_group = wheel

# The user to use when setting the user-ID and group-ID of new I/O
# log files and directories.  If iolog_group is set, it will be used
# instead of the user's primary group-ID.  By default, I/O log files
# and directories are created with user and group-ID 0.
#iolog_user = root

# The file mode to use when creating I/O log files.  The file permissions
# will always include the owner read and write bits, even if they are
# not present in the specified mode.  When creating I/O log directories,
# search (execute) bits are added to match the read and write bits
# specified by iolog_mode.
#iolog_mode = 0600

# If disabled, sudo_logsrvd will attempt to avoid logging plaintext
# password in the terminal input using passprompt_regex.
#log_passwords = true

# The maximum sequence number that will be substituted for the "%{seq}"
# escape in the I/O log file.  While the value substituted for "%{seq}"
# is in base 36, maxseq itself should be expressed in decimal.  Values
# larger than 2176782336 (which corresponds to the base 36 sequence
# number "ZZZZZZ") will be silently truncated to 2176782336.
#maxseq = 2176782336

# One or more POSIX extended regular expressions used to match
# password prompts in the terminal output when log_passwords is
# disabled.  Multiple passprompt_regex settings may be specified.
#passprompt_regex = [Pp]assword[: ]*
#passprompt_regex = [Pp]assword for [a-z0-9]+: *

[eventlog]
# Where to log accept, reject, exit, and alert events.
# Accepted values are syslog, logfile, or none.
# Defaults to syslog
#log_type = syslog

# Whether to log an event when a command exits or is terminated by a signal.
# Defaults to false
#log_exit = true

# Event log format.
# Currently only sudo-style event logs are supported.
#log_format = sudo

[syslog]
# The maximum length of a syslog payload.
# On many systems, syslog(3) has a relatively small log buffer.
# IETF RFC 5424 states that syslog servers must support messages
# of at least 480 bytes and should support messages up to 2048 bytes.
# Messages larger than this value will be split into multiple messages.
#maxlen = 960

# The syslog facility to use for event log messages.
# The following syslog facilities are supported: authpriv (if your OS
# supports it), auth, daemon, user, local0, local1, local2, local3,
# local4, local5, local6, and local7.
#facility = authpriv

# Syslog priority to use for event log accept messages, when the command
# is allowed by the security policy.  The following syslog priorities are
# supported: alert, crit, debug, emerg, err, info, notice, warning, none.
#accept_priority = notice

# Syslog priority to use for event log reject messages, when the command
# is not allowed by the security policy.
#reject_priority = alert

# Syslog priority to use for event log alert messages reported by the
# client.
#alert_priority = alert

# The syslog facility to use for server warning messages.
# Defaults to daemon.
#server_facility = daemon

[logfile]
# The path to the file-based event log.
# This path must be fully-qualified and start with a '/' character.
#path = /var/log/sudo.log

# The format string used when formatting the date and time for
# file-based event logs.  Formatting is performed via strftime(3) so
# any format string supported by that function is allowed.
#time_format = %h %e %T

โœจ SEE ALSO โœจ

for more reading, check out strftime(3), sudo.conf(5), sudoers(5), sudo(8), and sudo_logsrvd(8). ๐Ÿฆ‹

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Many people have worked on sudo over the years ๐ŸŒˆ this version consists of code written primarily by:

  • Todd C. Miller

And if you want the full list of everyone who's contributed to sudo, peep the CONTRIBUTORS.md file in the sudo distribution (https://www.sudo.ws/about/contributors/). They are so many legends. ๐Ÿซถ

โœจ BUGS โœจ

okay so if you think you've found a bug in sudo_logsrvd.conf ๐Ÿ›, you can either file a bug report in the sudo bug database at https://bugzilla.sudo.ws/ ๐Ÿ’–, or open an issue over at https://github.com/sudo-project/sudo/issues ๐Ÿซถ. if email is more your thing ๐Ÿ’Œ, messages can go to the sudo-workers mailing list at https://www.sudo.ws/mailman/listinfo/sudo-workers (public) or to <sudo@sudo.ws> (private) ๐Ÿฆ‹.

๐Ÿšจ okay this one is IMPORTANT bestie ๐Ÿšจ please do NOT report security vulnerabilities through public GitHub issues, Bugzilla, or mailing lists ๐Ÿ˜ญ. instead, email them directly to <Todd.Miller@sudo.ws> ๐Ÿ’œ. you're welcome to encrypt your message with PGP if you want ๐Ÿ”, using the key found at https://www.sudo.ws/dist/PGPKEYS โœจ.

๐ŸŽ€ SUPPORT ๐ŸŽ€

limited free support is available through the sudo-users mailing list ๐Ÿ’…. head to https://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or dig through the archives ๐Ÿงš.


๐Ÿ’€ DISCLAIMER ๐Ÿ’€

ngl this part is kinda serious ๐Ÿ™ˆ. sudo is provided โ€œAS ISโ€, and any express or implied warranties, including but not limited to the implied warranties of merchantability and fitness for a particular purpose, are disclaimed ๐Ÿ˜ญ. for complete details, check the LICENSE.md file distributed with sudo, or visit https://www.sudo.ws/about/license/ ๐Ÿ“œ.


Sudo 1.9.17p2 ๐ŸŒธ March 9, 2024 ๐ŸŒธ SUDO_LOGSRVD.CONF(5) ๐Ÿฆ‹ bye bestie, you're literally a Unix queen now ๐Ÿ‘‘๐Ÿ’–

๐Ÿ“ฆ where this page comes from