sudoers: more restrictive regexes

This commit is contained in:
Miraty 2022-11-28 17:22:12 +01:00
parent adbc192ef4
commit 9e806356c4
1 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
niver ALL=(root) NOPASSWD: /usr/bin/systemctl reload nginx
niver ALL=(root) NOPASSWD: /usr/bin/systemctl reload tor
niver ALL=(root) NOPASSWD: /usr/bin/chgrp ^sftpgo /srv/niver/ht/[^[:punct:][:space:][:cntrl:]]{1,128} --no-dereference$
niver ALL=(root) NOPASSWD: /usr/bin/certbot ^certonly( --test-cert)? --key-type rsa --rsa-key-size 3072 --webroot --webroot-path /srv/niver/acme --domain ([a-z0-9_-]{1,63}\.){1,126}[a-z0-9]{1,63}$
niver ALL=(root) NOPASSWD: /usr/bin/certbot ^delete --quiet --cert-name ([a-z0-9_-]{1,63}\.){1,126}[a-z0-9]{1,63}$
niver ALL=(root) NOPASSWD: /usr/bin/rm ^--recursive /srv/niver/ht/[^[:punct:][:space:][:cntrl:]]{1,128}$
niver ALL=(tor) NOPASSWD: /usr/bin/cat ^/srv/niver/tor-keys/[^[:punct:][:space:][:cntrl:]]{1,128}/[^[:punct:][:space:][:cntrl:]]{1,128}/hostname$
niver ALL=(tor) NOPASSWD: /usr/bin/mkdir ^--mode=0700 /srv/niver/tor-keys/[^[:punct:][:space:][:cntrl:]]{1,128}$
niver ALL=(tor) NOPASSWD: /usr/bin/rm ^--recursive /srv/niver/tor-keys/[^[:punct:][:space:][:cntrl:]]{1,128}(/[^[:punct:][:space:][:cntrl:]]{1,128})?$
niver ALL=(root) NOPASSWD: /usr/bin/systemctl reload nginx
niver ALL=(root) NOPASSWD: /usr/bin/systemctl reload tor
niver ALL=(root) NOPASSWD: /usr/bin/chgrp ^sftpgo /srv/niver/ht/[0-9a-f]{64} --no-dereference$
niver ALL=(root) NOPASSWD: /usr/bin/certbot ^certonly( --test-cert)? --key-type rsa --rsa-key-size 3072 --webroot --webroot-path /srv/niver/acme --domain ([a-z0-9_-]{1,63}\.){1,126}[a-z0-9]{1,63}$
niver ALL=(root) NOPASSWD: /usr/bin/certbot ^delete --quiet --cert-name ([a-z0-9_-]{1,63}\.){1,126}[a-z0-9]{1,63}$
niver ALL=(sftpgo) NOPASSWD: /usr/bin/rm ^--recursive /srv/niver/ht/[0-9a-f]{64}$
niver ALL=(tor) NOPASSWD: /usr/bin/cat ^/srv/niver/tor-keys/[0-9a-f]{64}/[a-zA-Z0-9_-]{1,64}/hostname$
niver ALL=(tor) NOPASSWD: /usr/bin/mkdir ^--mode=0700 /srv/niver/tor-keys/[0-9a-f]{64}$
niver ALL=(tor) NOPASSWD: /usr/bin/rm ^--recursive /srv/niver/tor-keys/[0-9a-f]{64}(/[a-zA-Z0-9_-]{1,64})?$