<?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: Running sudo on remote machine question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142405#M50164</link>
    <description>Thanks to all - you're rignt, only first command is running under root.&lt;BR /&gt;&lt;BR /&gt;But, in fact, I created this three-command example just for debugging my problem - my original command was just &lt;BR /&gt;&lt;BR /&gt;ssh -t vitaly@server sudo 'date &amp;gt;/tmp/kkk'&lt;BR /&gt;&lt;BR /&gt;what is the problem here?&lt;BR /&gt;</description>
    <pubDate>Mon, 24 Nov 2008 08:13:52 GMT</pubDate>
    <dc:creator>Vitaly Karasik_1</dc:creator>
    <dc:date>2008-11-24T08:13:52Z</dc:date>
    <item>
      <title>Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142401#M50160</link>
      <description>What a shame - it seems to be trivial, but I don't understand why it doesn't work.&lt;BR /&gt;&lt;BR /&gt;I'm running a command on remote machine via "sudo". Why /tmp/kkk isn't created under root?&lt;BR /&gt;&lt;BR /&gt;root@linux1 ~]# ssh -t vitaly@server sudo 'id; date &amp;gt;/tmp/kkk;ls -l /tmp/kkk'&lt;BR /&gt;uid=0(root) gid=0(root) groups=0(root)&lt;BR /&gt;-rw-r--r-- 1 vitaly vitaly 29 Nov 23 12:23 /tmp/kkk&lt;BR /&gt;</description>
      <pubDate>Sun, 23 Nov 2008 10:29:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142401#M50160</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2008-11-23T10:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142402#M50161</link>
      <description>It looks like you quoted it right.  Is kkk created on the right machine?&lt;BR /&gt;I assume it works if you put the 'id ...' in a script?</description>
      <pubDate>Sun, 23 Nov 2008 19:10:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142402#M50161</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-23T19:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142403#M50162</link>
      <description>Because the stdout redirection ( &amp;gt;file) is done by the shell, which isn't running as root but as vitaly. Run the command from a script or run the command in a new shell, using bash -c.</description>
      <pubDate>Sun, 23 Nov 2008 22:32:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142403#M50162</guid>
      <dc:creator>Marco Wessel</dc:creator>
      <dc:date>2008-11-23T22:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142404#M50163</link>
      <description>The problem is that after the the fist ";" all commands are different and not "sudoed". You should run sudo id; sudo date; and so.. Or as indicated above, all commands on a script.</description>
      <pubDate>Mon, 24 Nov 2008 02:49:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142404#M50163</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2008-11-24T02:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142405#M50164</link>
      <description>Thanks to all - you're rignt, only first command is running under root.&lt;BR /&gt;&lt;BR /&gt;But, in fact, I created this three-command example just for debugging my problem - my original command was just &lt;BR /&gt;&lt;BR /&gt;ssh -t vitaly@server sudo 'date &amp;gt;/tmp/kkk'&lt;BR /&gt;&lt;BR /&gt;what is the problem here?&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Nov 2008 08:13:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142405#M50164</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2008-11-24T08:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142406#M50165</link>
      <description>Check the sudo man page:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To make a usage listing of the directories in the /home partition.&lt;BR /&gt;Note that this runs the commands in a sub-shell to make the cd and file redirection work.&lt;BR /&gt;&lt;BR /&gt;sudo sh -c "ls &amp;gt; /tmp/ls.out"&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Nov 2008 12:27:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142406#M50165</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2008-11-24T12:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142407#M50166</link>
      <description>Oh! I really should read manpage!</description>
      <pubDate>Mon, 24 Nov 2008 12:52:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142407#M50166</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2008-11-24T12:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Running sudo on remote machine question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142408#M50167</link>
      <description>manpage&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Nov 2008 12:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-sudo-on-remote-machine-question/m-p/5142408#M50167</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2008-11-24T12:53:08Z</dc:date>
    </item>
  </channel>
</rss>

