<?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: su root -c command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742958#M256483</link>
    <description>"su root -c command" means execute command using the temporary environment and permissions of user root.&lt;BR /&gt;&lt;BR /&gt;cheers!&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Mar 2006 16:38:45 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-03-02T16:38:45Z</dc:date>
    <item>
      <title>su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742953#M256478</link>
      <description>What is the meaning of -c follows:&lt;BR /&gt;&lt;BR /&gt;su root -c "$COMMAND2"&lt;BR /&gt;&lt;BR /&gt;Thanks, manuales.</description>
      <pubDate>Thu, 02 Mar 2006 14:30:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742953#M256478</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2006-03-02T14:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742954#M256479</link>
      <description>It means "switch user to root and execute the command specified in the variable $COMMMAND2"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 02 Mar 2006 14:35:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742954#M256479</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-03-02T14:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742955#M256480</link>
      <description>The -c is to run a single command, as opposed to spawning a new shell environment.  This is a convenient option for scripting.&lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Thu, 02 Mar 2006 14:35:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742955#M256480</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2006-03-02T14:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742956#M256481</link>
      <description>Hi Manuales:&lt;BR /&gt;&lt;BR /&gt;The command says to switch the user to be "root" and then as the root user, run the command specified byt eh $COMMAND2 variable.&lt;BR /&gt;&lt;BR /&gt;Since the 'su' was of the form without a hyphen, as in 'su -', the login profile of the target user (here, "root") is *not* run first, before the command ($COMMAND) is executed.  See the manpages for 'su' for more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 02 Mar 2006 14:36:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742956#M256481</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-03-02T14:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742957#M256482</link>
      <description>It is running a command - non-interactively as well...&lt;BR /&gt;&lt;BR /&gt;$COMMAND2 is a command, could be a s simple as "date".&lt;BR /&gt;&lt;BR /&gt;su - root -c "/usr/bin/date"&lt;BR /&gt;&lt;BR /&gt;would run the command date as root (it would prompt for root password).&lt;BR /&gt;&lt;BR /&gt;More common to see root running commands (no password required)&lt;BR /&gt;&lt;BR /&gt;IE:&lt;BR /&gt;&lt;BR /&gt;as root:&lt;BR /&gt;&lt;BR /&gt;su - oracle -c "start_all.sh"&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2006 14:55:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742957#M256482</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-03-02T14:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742958#M256483</link>
      <description>"su root -c command" means execute command using the temporary environment and permissions of user root.&lt;BR /&gt;&lt;BR /&gt;cheers!&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2006 16:38:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742958#M256483</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-03-02T16:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: su root -c command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742959#M256484</link>
      <description>Hi,&lt;BR /&gt;   su -c is used for passing a single COMMAND to the shell.&lt;BR /&gt;&lt;BR /&gt;Ex;&lt;BR /&gt; I am a root user, wants to execute a ls command as "rtp40" user, then execute this command;&lt;BR /&gt;&lt;BR /&gt;kassel1:~ # su - rtp40 -c ls&lt;BR /&gt;1.sh  compo   ctxminitool  Documents                MgmtBadParamCheck.java   tstclasses&lt;BR /&gt;kassel1:~ #&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Prabu.S</description>
      <pubDate>Thu, 02 Mar 2006 22:50:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-root-c-command/m-p/3742959#M256484</guid>
      <dc:creator>Senthil Prabu.S_1</dc:creator>
      <dc:date>2006-03-02T22:50:08Z</dc:date>
    </item>
  </channel>
</rss>

