<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can sudo be set to log entries in 2 different places (locally and externally) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908039#M763347</link>
    <description>Yes - you have to pipe it with the logger command.&lt;BR /&gt;&lt;BR /&gt;I have a security system whereby I rotate the log every day at 23:55&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FACILITY=local1.info&lt;BR /&gt;TAG=BOKS&lt;BR /&gt;tail -f /var/opt/boksm/data/LOG | /opt/boksm/sbin/bkslog -f - | logger -p $FACILITY -t $TAG &amp;amp;&lt;BR /&gt;&lt;BR /&gt;You should be able to do the same with sudo.&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
    <pubDate>Tue, 05 Dec 2006 12:41:47 GMT</pubDate>
    <dc:creator>Geoff Wild</dc:creator>
    <dc:date>2006-12-05T12:41:47Z</dc:date>
    <item>
      <title>Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908038#M763346</link>
      <description>Hi everyone!&lt;BR /&gt;&lt;BR /&gt;Currently have SUDO set to write all the log entries to syslog. (which is the default and we will like to keep)&lt;BR /&gt;&lt;BR /&gt;Recently, we hired a third party company to check our logs (we are supplying them with the syslog information using the syslog.conf file)but we will like to also provide them with the SUDO activity entries. &lt;BR /&gt;&lt;BR /&gt;Would it be possible to push the SUDO entries to the log server and also keep an entry in the syslog file?&lt;BR /&gt;&lt;BR /&gt;I know that you set that in the sudoers file but will like to make sure the syslog entry will still be available in syslog.&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;DR</description>
      <pubDate>Tue, 05 Dec 2006 12:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908038#M763346</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2006-12-05T12:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908039#M763347</link>
      <description>Yes - you have to pipe it with the logger command.&lt;BR /&gt;&lt;BR /&gt;I have a security system whereby I rotate the log every day at 23:55&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FACILITY=local1.info&lt;BR /&gt;TAG=BOKS&lt;BR /&gt;tail -f /var/opt/boksm/data/LOG | /opt/boksm/sbin/bkslog -f - | logger -p $FACILITY -t $TAG &amp;amp;&lt;BR /&gt;&lt;BR /&gt;You should be able to do the same with sudo.&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 05 Dec 2006 12:41:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908039#M763347</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-12-05T12:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908040#M763348</link>
      <description>SUDO can be configured to use syslog, and syslog to log into a remote host. So you can have two logging locations.</description>
      <pubDate>Tue, 05 Dec 2006 12:45:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908040#M763348</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-12-05T12:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908041#M763349</link>
      <description>using visudo add this lines:&lt;BR /&gt;&lt;BR /&gt;Defaults !syslog&lt;BR /&gt;Defaults logfile=/var/adm/sudo.log &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;this will log entries in another file. For more info see man sudoers.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Tue, 05 Dec 2006 12:50:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908041#M763349</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2006-12-05T12:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908042#M763350</link>
      <description>Thank you all for the answers. &lt;BR /&gt;&lt;BR /&gt;Geoff:&lt;BR /&gt;&lt;BR /&gt;I was thinking about doing something like that but I have to push the SUDO entries immediately to the company's appliance because we are getting real time response from them. &lt;BR /&gt;&lt;BR /&gt;Ivan:&lt;BR /&gt;&lt;BR /&gt;Your solution is the most appropriate but I can't come up with the correct syntax to direct and load the SUDO information to the appliance. Currently, I have the following line which is working fine but this is only uploading system generated messages.&lt;BR /&gt;&lt;BR /&gt;*.emerg;*.err;*.alert;kern.debug;daemon.notice;auth.info;cron.info;mail.crit  @COMPANY.IP.ADDRESS&lt;BR /&gt;&lt;BR /&gt;All the SUDO entries have the word bmoc on them which should make this process easier but I am not able to get any information loadded to the company applicance.&lt;BR /&gt;&lt;BR /&gt;Ivan:&lt;BR /&gt;&lt;BR /&gt;My original question was generated thinking on that Default option but if I do that, I will stop sending entries to the syslog and will just create a separate log.&lt;BR /&gt;&lt;BR /&gt;My question in this case will be:&lt;BR /&gt;&lt;BR /&gt;Can I direct log entries to an external appliance? If yes, do I have to disable syslog or can I have both enabled?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Dec 2006 14:10:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908042#M763350</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2006-12-05T14:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908043#M763351</link>
      <description>With my way - they do go immediately - bacically, as the log changes (tail -f) it is sent to the remote server.&lt;BR /&gt;&lt;BR /&gt;The reason for the 23:55 - is the log is quite big - so I rotate it.&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 05 Dec 2006 14:38:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908043#M763351</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-12-05T14:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908044#M763352</link>
      <description>Geoff:&lt;BR /&gt;&lt;BR /&gt;One more question, are you pushing the entries with the logger command to a local or external file? I am trying to push these files to a centralized logging server which is external. I don't know if the -f option will allow me to do that.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Dec 2006 16:25:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908044#M763352</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2006-12-05T16:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908045#M763353</link>
      <description>&lt;!--!*#--&gt;Dario,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;One more question, are you pushing the entries &lt;BR /&gt;&amp;gt;with the logger command to a local or external file?&lt;BR /&gt;&lt;BR /&gt;Geof's suggestion is that if you have sudo log to its &lt;BR /&gt;own log file, then you can also have those log entries&lt;BR /&gt;forwarded via syslog by injecting those log&lt;BR /&gt;entries into syslog. His tail -f script was monitoring&lt;BR /&gt;the log file and using logger to post the log entries&lt;BR /&gt;to syslog. If your syslog is configured for syslog fowarding,&lt;BR /&gt;then the end result is that the sudo log messages end up&lt;BR /&gt;in the sudo log, the local syslog, and the remote syslog. &lt;BR /&gt;&lt;BR /&gt;That said, since sudo can already log to syslog directly, &lt;BR /&gt;I think the only piece you are missing is that your&lt;BR /&gt;syslog.conf forwarding entry needs work:&lt;BR /&gt;&lt;BR /&gt;*.emerg;*.err;*.alert;kern.debug;daemon.notice;auth.info;cron.info;mail.crit&lt;BR /&gt; @COMPANY.IP.ADDRESS &lt;BR /&gt;&lt;BR /&gt;From the sudo docs, it looks like sudo defaults to using&lt;BR /&gt;the "local2" facility (and this is customizable). &lt;BR /&gt;But it's not clear what priority message are used. For example, &lt;BR /&gt;the docs mention syslog_goodpri (defaults to notice) &lt;BR /&gt;and  syslog_badpri (defaults to alert). Are there others?&lt;BR /&gt;Your current syslog filter would be missing local2.notice but&lt;BR /&gt;catching local2.alert.  alerts would be posted when a user&lt;BR /&gt;authenticates incorrectly to sudo. If you leave the sudo &lt;BR /&gt;facility at local2, then add local2.* to your syslog filter and &lt;BR /&gt;all sudo messages will be forwarded. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Dec 2006 23:57:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908045#M763353</guid>
      <dc:creator>PeterWolfe</dc:creator>
      <dc:date>2006-12-05T23:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908046#M763354</link>
      <description>Peter&lt;BR /&gt;&lt;BR /&gt;Thank you for the clarification. That is totally true. The 3rd party company notified that they are getting some of the SUDO, which happens to be the alerts because I have the *.alert in the line. In order to be able to forward the rest, I will add the *.notice to the line and I will get the rest. &lt;BR /&gt;&lt;BR /&gt;Now, the IDS alerts I will try to get by assigning the priority to local5.alert  using the logger command with the -p option and then adding the local5.alert to the syslog.conf line. That should take care of that.&lt;BR /&gt;&lt;BR /&gt;Thank you all for all the help.&lt;BR /&gt;&lt;BR /&gt;DR</description>
      <pubDate>Wed, 06 Dec 2006 08:59:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908046#M763354</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2006-12-06T08:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908047#M763355</link>
      <description>If you use the standard HP-supplied sudo, the syslog facilty is LOCAL2 with the priority NOTICE for successful sudo invocations and ALERT for failed sudo commands. Like most applications, this information is never documented so you have to discover it by restarting syslogd with the -v option. Since this is really useful, I make the change permanent in /etc/rc.config.d/syslogd. The attached script can decode the special 2-char code that syslogd -v adds to syslog.&lt;BR /&gt; &lt;BR /&gt;Note that /etc/syslog.conf REQUIRES tabs for each entry and silently ignores lines with spaces. Use cat -t /etc/syslog.conf to show the tabs (and spaces).</description>
      <pubDate>Wed, 06 Dec 2006 09:07:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908047#M763355</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-12-06T09:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can sudo be set to log entries in 2 different places (locally and externally)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908048#M763356</link>
      <description>Bill:&lt;BR /&gt;&lt;BR /&gt;You got it. I was able to re-direct IDS data as well by using your recommendation.&lt;BR /&gt;&lt;BR /&gt;thank you,&lt;BR /&gt;&lt;BR /&gt;Dario</description>
      <pubDate>Thu, 07 Dec 2006 17:18:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-sudo-be-set-to-log-entries-in-2-different-places-locally-and/m-p/3908048#M763356</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2006-12-07T17:18:28Z</dc:date>
    </item>
  </channel>
</rss>

