SUDO_LOGSRVD(8) System Manager's Manual SUDO_LOGSRVD(8) (NAME) sudo_logsrvd - sudo (SYNOPSIS) sudo_logsrvd [-hnV] [-f file] [-R percentage] (DESCRIPTION) sudo_logsrvd / (I/O) sudo . sudo . : (local) (relay). sudo_logsrvd sudo_logsrv.proto(5) . syslog(3) . / sudo_logsrvd sudoreplay(8) sudoers . . / (timing) / . sudo_logsrvd sudo_logsrvd.conf(5) -f . sudo_logsrvd SIGHUP SIGUSR1 ( ) . (OPTIONS) : -f file, --file=file file /etc/sudo_logsrvd.conf. -h, --help . -n, --no-fork sudo_logsrvd . -R percentage, --random-drop=percentage percentage . . -V, --version sudo_logsrvd . / sudo_logsrvd (TLS) . tls_checkpeer sudo_logsrvd.conf(5) . (CA) CA . CA (EXAMPLES) . sudo_logsrvd sudo_logsrvd Debug sudo.conf(5) . sudo.conf(5) . (FILES) /etc/sudo.conf Sudo /etc/sudo_logsrvd.conf Sudo /var/log/sudo_logsrvd/incoming store_first relay . /var/log/sudo_logsrvd/outgoing store_first relay . /var/log/sudo-io / /run/sudo/sudo_logsrvd.pid (PID) sudo_logsrvd (EXAMPLES) (CA) ( CA ) CA sudo_logsrvd, sudo_sendlog sudoers . openssl(1) . CA . /etc/ssl/sudo . # mkdir /etc/ssl/sudo # cd /etc/ssl/sudo # mkdir certs csr newcerts private # chmod 700 private # touch index.txt # echo 1000 > serial serial index.txt . openssl.cnf CA . openssl.cnf /etc/ssl/openssl.cnf . . # cp /etc/ssl/openssl.cnf . openssl.cnf "ca " "CA_default " "v3_ca" "usr_cert" . : [ ca ] default_ca = CA_default [ CA_default ] dir = /etc/ssl/sudo certs = /certs database = /index.txt certificate = /cacert.pem serial = /serial [ v3_ca ] subjectKeyIdentifier = hash authorityKeyIdentifier = keyid:always,issuer basicConstraints = critical,CA:true keyUsage = cRLSign, keyCertSign [ usr_cert ] basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, \ keyEncipherment subjectKeyIdentifier = hash authorityKeyIdentifier = keyid,issuer openssl.cnf "CA_default" "dir" "keyUsage" ( ) . CA CA . (passphrase) : # openssl genrsa -aes256 -out private/cakey.pem 4096 # chmod 400 private/cakey.pem : # openssl req -config openssl.cnf -key private/cakey.pem \ -new -x509 -days 7300 -sha256 -extensions v3_ca \ -out cacert.pem Enter pass phrase for private/cakey.pem: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:Colorado Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgets Pty Ltd]:sudo Organizational Unit Name (eg, section) []:sudo Certificate Authority Common Name (e.g., server FQDN or YOUR name) []:sudo Root CA Email Address []: # chmod 444 cacert.pem : # openssl x509 -noout -text -in cacert.pem CA . CA / . (intermediate) CA (CSR) . CSR CA . . # openssl genrsa -out private/logsrvd_key.pem 2048 # chmod 400 private/logsrvd_key.pem (CSR) . (organization name) . (common name) IP (FQDN). # openssl req -config openssl.cnf -key private/logsrvd_key.pem -new \ -sha256 -out csr/logsrvd_csr.pem Enter pass phrase for private/logsrvd_key.pem: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:Colorado Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgets Pty Ltd]:sudo Organizational Unit Name (eg, section) []:sudo log server Common Name (e.g., server FQDN or YOUR name) []:logserver.example.com Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: CSR : # openssl ca -config openssl.cnf -days 375 -notext -md sha256 \ -in csr/logsrvd_csr.pem -out certs/logsrvd_cert.pem Using configuration from openssl.cnf Enter pass phrase for ./private/cakey.pem: Check that the request matches the signature Signature ok Certificate Details: Serial Number: 4096 (0x1000) Validity Not Before: Nov 11 14:05:05 2019 GMT Not After : Nov 20 14:05:05 2020 GMT Subject: countryName = US stateOrProvinceName = Colorado organizationName = sudo organizationalUnitName = sudo log server commonName = logserve.example.com X509v3 extensions: X509v3 Basic Constraints: CA:FALSE X509v3 Key Usage: Digital Signature, Non Repudiation, Key Encipherment X509v3 Subject Key Identifier: 4C:50:F9:D0:BE:1A:4C:B2:AC:90:76:56:C7:9E:16:AE:E6:9E:E5:B5 X509v3 Authority Key Identifier: keyid:D7:91:24:16:B1:03:06:65:1A:7A:6E:CF:51:E9:5C:CB:7A:95:3E:0C Certificate is to be certified until Nov 20 14:05:05 2020 GMT (375 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated : # openssl verify -CAfile cacert.pem certs/logsrvd_cert.pem certs/logsrvd_cert.pem: OK /etc/ssl/sudo/certs sudo_logsrvd . . sudo_logsrvd TLS TLS / sudo_logsrvd sudoers TLS . sudo_logsrvd TLS : # Listen on port 30344 for TLS connections to any address. listen_address = *:30344(tls) # Path to the certificate authority bundle file in PEM format. tls_cacert = /etc/ssl/sudo/cacert.pem # Path to the server's certificate file in PEM format. tls_cert = /etc/ssl/sudo/certs/logsrvd_cert.pem # Path to the server's private key file in PEM format. tls_key = /etc/ssl/sudo/private/logsrvd_key.pem CA (cacert.pem) sudo_logsrvd . (peer authentication) cacert.pem . (SEE ALSO) sudo.conf(5), sudo_logsrv.proto(5), sudo_logsrvd.conf(5), sudoers(5), sudo(8), sudo_sendlog(8), sudoreplay(8) (AUTHORS) sudo : Todd C. Miller sudo CONTRIBUTORS.md sudo (https://www.sudo.ws/about/contributors) . (BUGS) sudo_logsrvd sudo https://bugzilla.sudo.ws issue https://github.com/sudo- project/sudo/issues . sudo-workers https://www.sudo.ws/mailman/listinfo/sudo-workers () () . issue Bugzilla . . PGP https://www.sudo.ws/dist/PGPKEYS . (SUPPORT) sudo https://www.sudo.ws/mailman/listinfo/sudo-users . (DISCLAIMER) sudo_logsrvd " " (AS IS) . LICENSE.md sudo https://www.sudo.ws/about/license . Sudo 1.9.17p2 July 14, 2024 Sudo 1.9.17p2