<?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: sudo -s Logging in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717539#M42832</link>
    <description>Sudo by itself won't do it. It only logs the command started by sudo, nothing else. After the command is started, any further logging would have to be done by the command itself.&lt;BR /&gt;&lt;BR /&gt;You would need one of the following:&lt;BR /&gt;- a modified shell that logs all commands, or&lt;BR /&gt;- kernel-level auditing that records the parameters of all commands executed, or&lt;BR /&gt;- a wrapper that records all the input and output of the privileged shell.&lt;BR /&gt;&lt;BR /&gt;Sourceforge has "sudosh": &lt;A href="http://sourceforge.net/projects/sudosh/files/" target="_blank"&gt;http://sourceforge.net/projects/sudosh/files/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It acts as a wrapper between sudo and the shell and records all the input and output.&lt;BR /&gt;Instructions to configure it are in the README file within the sudosh source code package.&lt;BR /&gt;&lt;BR /&gt;Once you have set up sudosh, you will have to change your winscp to use "sudo sudosh" instead of "sudo -s" (or replace the real "sudo" with a script that modifies the command line before the real "sudo" command is executed). &lt;BR /&gt;&lt;BR /&gt;The sudosh package also includes "sudosh-replay", which allows you to view all recorded sudosh sessions in complete detail.&lt;BR /&gt;&lt;BR /&gt;MK</description>
    <pubDate>Wed, 24 Nov 2010 15:03:22 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2010-11-24T15:03:22Z</dc:date>
    <item>
      <title>sudo -s Logging</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717536#M42829</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have setup winscp to sudo -s for a user.&lt;BR /&gt;&lt;BR /&gt;I have setup the logging to send to the /var/log/sudo.log&lt;BR /&gt;&lt;BR /&gt;the only entry i see in there is the sudo -s.&lt;BR /&gt;&lt;BR /&gt;there after i do not see what the user is doing.&lt;BR /&gt;&lt;BR /&gt;I have looked in /var/log/messages&lt;BR /&gt; as well.&lt;BR /&gt;where would this be logged?</description>
      <pubDate>Wed, 24 Nov 2010 10:37:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717536#M42829</guid>
      <dc:creator>wayne_104</dc:creator>
      <dc:date>2010-11-24T10:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: sudo -s Logging</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717537#M42830</link>
      <description>Hi wayne,&lt;BR /&gt;&lt;BR /&gt;from the man page:&lt;BR /&gt;&lt;BR /&gt;-s [command]&lt;BR /&gt;                   The -s (shell) option runs the shell specified by the SHELL&lt;BR /&gt;                   environment variable if it is set or the shell as specified in&lt;BR /&gt;                   passwd(5).  If a command is specified, it is passed to the shell&lt;BR /&gt;                   for execution.  Otherwise, an interactive shell is executed.&lt;BR /&gt;&lt;BR /&gt;So after the "sudo -s" has been executed without command, your are in the (root?) shell and the logs would be in the history file of the user.&lt;BR /&gt;&lt;BR /&gt;If you are using bash, you can have it log all the commands in syslog.&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Wed, 24 Nov 2010 11:09:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717537#M42830</guid>
      <dc:creator>FLQ</dc:creator>
      <dc:date>2010-11-24T11:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: sudo -s Logging</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717538#M42831</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;thanks for the reply but it does not log to .bash_history&lt;BR /&gt;&lt;BR /&gt;found a man that says that it wont but i am not so sure that it cannot be done.</description>
      <pubDate>Wed, 24 Nov 2010 11:43:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717538#M42831</guid>
      <dc:creator>wayne_104</dc:creator>
      <dc:date>2010-11-24T11:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: sudo -s Logging</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717539#M42832</link>
      <description>Sudo by itself won't do it. It only logs the command started by sudo, nothing else. After the command is started, any further logging would have to be done by the command itself.&lt;BR /&gt;&lt;BR /&gt;You would need one of the following:&lt;BR /&gt;- a modified shell that logs all commands, or&lt;BR /&gt;- kernel-level auditing that records the parameters of all commands executed, or&lt;BR /&gt;- a wrapper that records all the input and output of the privileged shell.&lt;BR /&gt;&lt;BR /&gt;Sourceforge has "sudosh": &lt;A href="http://sourceforge.net/projects/sudosh/files/" target="_blank"&gt;http://sourceforge.net/projects/sudosh/files/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It acts as a wrapper between sudo and the shell and records all the input and output.&lt;BR /&gt;Instructions to configure it are in the README file within the sudosh source code package.&lt;BR /&gt;&lt;BR /&gt;Once you have set up sudosh, you will have to change your winscp to use "sudo sudosh" instead of "sudo -s" (or replace the real "sudo" with a script that modifies the command line before the real "sudo" command is executed). &lt;BR /&gt;&lt;BR /&gt;The sudosh package also includes "sudosh-replay", which allows you to view all recorded sudosh sessions in complete detail.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 24 Nov 2010 15:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717539#M42832</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-11-24T15:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: sudo -s Logging</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717540#M42833</link>
      <description>Use enhanced ksh (ksh93)?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.ibm.com/developerworks/aix/library/au-korn93/index.html" target="_blank"&gt;http://www.ibm.com/developerworks/aix/library/au-korn93/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;That's how our systems aer set up... when an admin "sudo -s -E" to root -- all commands aer logged "elsewhere"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Nov 2010 15:08:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sudo-s-logging/m-p/4717540#M42833</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2010-11-24T15:08:38Z</dc:date>
    </item>
  </channel>
</rss>

