<?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 command in non interactive mode in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226346#M893628</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The following workaround is also possible:&lt;BR /&gt;Instead of running su command you can run remsh. In this case you permit to user1 from computer srvrn (own hostname) to login as  user2 without an authentication, i.e. in ~user2/.rhosts you add &lt;BR /&gt;srvrn user1.&lt;BR /&gt;&lt;BR /&gt;in this case you run as user1 on srvrn&lt;BR /&gt;remsh srvrn -l user2 needed_script</description>
    <pubDate>Tue, 23 Mar 2004 09:22:09 GMT</pubDate>
    <dc:creator>Victor Fridyev</dc:creator>
    <dc:date>2004-03-23T09:22:09Z</dc:date>
    <item>
      <title>SU command in non interactive mode</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226341#M893623</link>
      <description>Can i run the SU command in a non interactive mode. What i want to do is to pass the username and the password as commandline or batch parameters. Please let me if its possible and how to pass them. A sample file will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Mon, 22 Mar 2004 20:43:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226341#M893623</guid>
      <dc:creator>Guy_34</dc:creator>
      <dc:date>2004-03-22T20:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: SU command in non interactive mode</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226342#M893624</link>
      <description>No and this would be a huge security risk if you could. Only when you are running as root will su not prompt for a password. A good way to do this is via the sudo command. A less good way would be to create a setuid c program that exec's your script.&lt;BR /&gt;&lt;BR /&gt;You can get sudo here:&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/&lt;/A&gt;</description>
      <pubDate>Mon, 22 Mar 2004 21:15:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226342#M893624</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-22T21:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: SU command in non interactive mode</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226343#M893625</link>
      <description>You could also wrap this up in an expect script. See the attached example of providing a password without user interaction.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Mar 2004 21:39:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226343#M893625</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-03-22T21:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: SU command in non interactive mode</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226344#M893626</link>
      <description>What I should have also mentioned is that there is a security risk associated with this, as rightly pointed out already by Clay.</description>
      <pubDate>Mon, 22 Mar 2004 22:16:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226344#M893626</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-03-22T22:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: SU command in non interactive mode</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226345#M893627</link>
      <description>You can evaluate to use "ssh -l username host command" being sure to exchange before and register public user key in authorized_keys file.&lt;BR /&gt;&lt;BR /&gt;RGDS&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mauro</description>
      <pubDate>Tue, 23 Mar 2004 07:32:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226345#M893627</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2004-03-23T07:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: SU command in non interactive mode</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226346#M893628</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The following workaround is also possible:&lt;BR /&gt;Instead of running su command you can run remsh. In this case you permit to user1 from computer srvrn (own hostname) to login as  user2 without an authentication, i.e. in ~user2/.rhosts you add &lt;BR /&gt;srvrn user1.&lt;BR /&gt;&lt;BR /&gt;in this case you run as user1 on srvrn&lt;BR /&gt;remsh srvrn -l user2 needed_script</description>
      <pubDate>Tue, 23 Mar 2004 09:22:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-command-in-non-interactive-mode/m-p/3226346#M893628</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2004-03-23T09:22:09Z</dc:date>
    </item>
  </channel>
</rss>

