SUDO_LOGSRVD.CONF(5)
๐ 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 ๐
serverrelayiologeventlogsysloglogfile
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 arenone,stderr,syslog, or a path name starting with the/character ๐ Thestderrvalue only works when you pair it with the-noption ๐ The default issyslogโจpid_file = pathโ the path to the file holding the process ID of the runningsudo_logsrvd๐ชช If you set it to an empty value, or you runsudo_logsrvdwith the-noption, nopid_filegets created ๐ โโ๏ธ Ifpid_filepoints to a symbolic link, it gets ignored ๐ The default value is/run/sudo/sudo_logsrvd.pid๐tcp_keepalive = booleanโ if true,sudo_logsrvdturns 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_logsrvdwaits for the client to respond โฐ A value of0disables the timeout entirely ๐ The default is30๐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.pemif 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_logsrvdvalidates 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, thentls_cacertmust be set to a CA bundle that contains the CA certificate used to generate the client certificate ๐ The default isfalse๐ท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 inopenssl-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_logsrvdvalidates 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 tofalse๐ The default istrue๐
๐ 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_logsrvdwaits for the connection to arelay_host(more on that below) to finish โณ Once connected, thetimeoutsetting takes over and controls how longsudo_logsrvdwaits for the relay to respond ๐ฐ๏ธ A value of0disables the timeout ๐ The default is30๐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 bysudo_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 matcheslisten_addressin theserversection 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 is30๐store_first = booleanโ if true,sudo_logsrvdstores 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_logsrvdturns 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_logsrvdwaits for the relay server to respond after a connection succeeds โฐ A value of0disables the timeout ๐ The default is30๐ธ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 theserversection, 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 theserversection ๐tls_checkpeer = boolโ if true,sudo_logsrvdvalidates 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, thentls_cacertmust 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 theserversection ๐ท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 inopenssl-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 istrue, the server certificate that's used for relaying gets verified at startup โจ If it'sfalse, nothing gets verified ๐ Heads up bestie: if you're using self-signed certificates with no certificate authority, this should be set tofalse๐ 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 isfalseiolog_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, like0100A5, 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 toiolog_dir, where I/O logs get stored ๐ It's totally possible foriolog_fileto 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 smooshingiolog_dirandiolog_filetogether already exists, the existing I/O log file gets truncated and overwritten, unlessiolog_fileends in six or moreXs. 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 istrueโจiolog_group= name โ the group name to look up when setting the group-ID on new I/O log files and directories ๐ง Ifiolog_groupisn't set, the primary group-ID of the user specified byiolog_usergets used ๐ If neitheriolog_groupnoriolog_useris set, I/O log files and directories are created with group-ID0๐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 fromiolog_mode๐ Default value is0600๐ธiolog_user= name โ the user name to look up when setting the owner of new I/O log files and directories ๐ Ifiolog_groupis 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-ID0๐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 ๐ Iflog_passwordsis set tofalse,sudo_logsrvdwill try to stop passwords from being logged ๐ฅ It does this by using the regular expressions inpassprompt_regexto 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 (likesudowhen thepwfeedbackoption is set), only the first character of the password gets replaced in the I/O log ๐ญ Default value istrue๐maxseq= number โ the maximum sequence number that will be substituted for the"%{seq}"escape in the I/O log file (see theiolog_dirdescription above for more deets) ๐ข The value substituted for"%{seq}"is in base 36, butmaxseqitself should be written in decimal ๐ง Values bigger than2176782336(which corresponds to the base 36 sequence numberZZZZZZ) get silently truncated to2176782336๐คซ Default value is2176782336๐passprompt_regex= string โ one or more POSIX extended regular expressions used to match password prompts in the terminal output whenlog_passwordsis disabled ๐ As an extension, if the regular expression begins with"(?i)", it gets matched case-insensitively ๐ซถ You can set multiplepassprompt_regexsettings โจ 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 aresyslog,logfile, andnone๐ซถ Default value issyslog๐ธlog_exit= boolean โ iftrue,sudo_logsrvdwill log an event when a command exits or gets terminated by a signal ๐ช Defaults tofalse๐log_format= string โ the event log format ๐ Supported log formats are:jsonโ currently this is an alias forjson_pretty๐ง In a future version ofsudo_logsrvd,jsonwill be equivalent tojson_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 betweenjson_prettyandjson_compact๐ซถsudoโ logs events in the traditional sudo-style log format ๐ฆ See the EVENT LOGGING section insudoers(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 toauthpriv๐
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 tonotice๐
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 toalert๐จ
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 toalert๐ฅ
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 least480bytes and should support messages up to2048bytes ๐ By default,sudo_logsrvdcreates log messages up to960bytes ๐ธ That corresponds to the historic BSD syslog implementation, which used a1024byte 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 todaemon๐ง
โจ 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'sstrftime(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
- alpine 3.24: sudo-doc 1.9.17_p2-r2 ยท custom ISC
- fedora 43: sudo-logsrvd 1.9.17-7.p2.fc43 ยท ISC
- fedora 44: sudo-logsrvd 1.9.17-10.p2.fc44 ยท ISC
- fedora 44: sudo-logsrvd 1.9.17-7.p2.fc44 ยท ISC
- nixos 26.05: sudo 1.9.17p2
- nixpkgs unstable: sudo 1.9.17p2
- ubuntu questing: sudo 1.9.17p2-1ubuntu1
- ubuntu questing: sudo 1.9.17p2-1ubuntu1.1 ยท ISC
- ubuntu resolute: sudo 1.9.17p2-1ubuntu3 ยท ISC
- ubuntu resolute: sudo 1.9.17p2-1ubuntu3.2 ยท ISC
- ubuntu stonking: sudo 1.9.17p2-7ubuntu5 ยท ISC
- ๐ the page's license: ISC
- Copyright (c) 2019-2023 Todd C. Miller <Todd.Miller@sudo.ws>
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms