{"id":75,"date":"2009-05-14T21:05:10","date_gmt":"2009-05-14T19:05:10","guid":{"rendered":"http:\/\/new.cs-ware.de\/?p=75"},"modified":"2013-05-02T00:22:18","modified_gmt":"2013-05-01T22:22:18","slug":"sudo-pcre-support-for-sudoers-rules","status":"publish","type":"post","link":"https:\/\/www.cs-ware.de\/blog\/archives\/75","title":{"rendered":"sudo: pcre support for sudoers rules"},"content":{"rendered":"<p>In order to be more flexible in sudoer rules, I added pcre support to sudo (<a href=\"\/blog\/wp-content\/uploads\/2009\/05\/sudo-pcre.patch\">sudo-pcre.patch<\/a>).<\/p>\n<p>A pcre enabled sudo can e.g. use the following rules:<br \/>\n<code># only allow restart and status parameters for some initscripts<br \/>\n%operating ALL = \/sbin\/service (clamd|postfix|dhcpd|amavisd|postgrey) (restart|status)<br \/>\n# only allow to change password for usernames starting with a two numbers<br \/>\n%operating ALL = \/usr\/sbin\/chsmbpw.pl [0-9][0-9][a-z-]+<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to be more flexible in sudoer rules, I added pcre support to sudo (sudo-pcre.patch). A pcre enabled sudo can e.g. use the following rules: # only allow restart and status parameters for some initscripts %operating ALL = \/sbin\/service (clamd|postfix|dhcpd|amavisd|postgrey) (restart|status) # only allow to change password for usernames starting with a two numbers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,2],"tags":[],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-linux","category-patches"],"_links":{"self":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":10,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}