{"id":864,"date":"2017-12-07T10:23:37","date_gmt":"2017-12-06T22:23:37","guid":{"rendered":"http:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=864"},"modified":"2017-12-07T10:23:37","modified_gmt":"2017-12-06T22:23:37","slug":"new-fedora-quirks-sar-and-the-logger-program","status":"publish","type":"post","link":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=864","title":{"rendered":"New Fedora quirks, SAR and the logger program"},"content":{"rendered":"<h2>SAR<\/h2>\n<p>\nNoticed SAR had not been collecting statistics for a while, looks like it actually stopped around the time I upgraded to F26 rather than being a F27 issue.\n<\/p>\n<p>\nSystemctl showed the sysstat.service was running, just not producing any data. There were old sarNN files in \/var\/log\/sa but not current sarNN files, and no saNN files.\n<\/p>\n<p>\nA bit of googling and a wild guess&#8230; deleting all the old files in \/var\/log\/sa and a &#8220;systemctl restart sysstat&#8221; seems to have fixed that, at least there is a saNN file being written for today.\n<\/p>\n<h2>The logger program in F27 only works for the root user<\/h2>\n<p>\nRunning logger as anybody other than root fails to log any messages (note selinux is permissive and there are no audit denies anyway). <em>Running as root logs OK<\/em>.\n<\/p>\n<p>\nThis is new behaviour, some of my system health check scripts use logger to report OK, and the OK messages are checked for by nrpe plugins (via nagios\/nrpe). The issue was picked up as the nrpe checks were unable to find any matching messages in \/var\/log\/messages, as logger was just not writing them&#8230; as of course like any sensible user check scriots do not need to run as root.\n<\/p>\n<p>\nMy initial plan for a quick fix was the thought that I shold just turm the SUID bit on logger and look into the issue later, as it isomething that should be available to any iser that wants it&#8230; <em>but the SUID bit could not be set<\/em> !?!?!. As seen below, no change.\n<\/p>\n<pre>\r\n[root@vosprey2 ~]# which logger\r\n\/usr\/bin\/logger\r\n[root@vosprey2 ~]# cd \/usr\/bin\r\n[root@vosprey2 bin]# ls -la logger\r\n-rwxr-xr-x. 1 root root 49616 Sep 22 20:37 logger\r\n[root@vosprey2 bin]# chmod o+s logger\r\n[root@vosprey2 bin]# ls -la logger\r\n-rwxr-xr-x. 1 root root 49616 Sep 22 20:37 logger\r\n[root@vosprey2 bin]# \r\n<\/pre>\n<p>\nSo my current workaround is to add \/usr\/bin\/logger to the sudoers file for my userid as that is the userid my cron jobs run under and alter the scripts that use logger to sudo \/usr\/bin\/logger.\n<\/p>\n<pre>\r\nDefaults:mark !requiretty\r\nmark vosprey2=NOPASSWD: \/usr\/bin\/logger\r\n<\/pre>\n<p>\nNot ideal, but it will do until I figure out whu non-root users can no logger use logger.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SAR Noticed SAR had not been collecting statistics for a while, looks like it actually stopped around the time I upgraded to F26 rather than being a F27 issue. Systemctl showed the sysstat.service was running, just not producing any data. &hellip; <a href=\"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=864\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-864","post","type-post","status-publish","format-standard","hentry","category-my-nux-thoughts-and-notes"],"_links":{"self":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=864"}],"version-history":[{"count":1,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":865,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/864\/revisions\/865"}],"wp:attachment":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}