<?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: script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417065#M640133</link>
    <description>sorry mark..&lt;BR /&gt;RAC is right, rexec uses .netrc for user authentication and remsh uses rhosts or host.equiv file....</description>
    <pubDate>Mon, 08 Nov 2004 07:15:38 GMT</pubDate>
    <dc:creator>Bharat Katkar</dc:creator>
    <dc:date>2004-11-08T07:15:38Z</dc:date>
    <item>
      <title>script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417060#M640128</link>
      <description>I have the following script:&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;while read UNIX_Q NT_server NT_Q        &lt;BR /&gt;do                                      &lt;BR /&gt;for hostbox in $(cat /.netrc|grep root |awk '{print $2}')                      &lt;BR /&gt;do                                            echo $hostbox              &lt;BR /&gt;rexec $hostbox "usr/cbin/lpshut"&lt;BR /&gt;rexec $hostbox "/usr/sbin/lpadmin -p$UNIX_Q -v/dev/null -mrmodel -orm$NT_server -o&lt;BR /&gt;rp$NT_Q -ocmrcmodel -osmrsmodel -ob3"&lt;BR /&gt;rexec $hostbox "/usr/sbin/lpsched"     &lt;BR /&gt;rexec $hostbox "/usr/bin/enable $UNIX_Q"    &lt;BR /&gt;rexec $hostbox "/usr/sbin/accept $UNIX_Q"  &lt;BR /&gt;done                                                                          &lt;BR /&gt;done &amp;lt; printers.txt &lt;BR /&gt;&lt;BR /&gt;It only runs once. If i comment out the rexec and add some echo's it works ok. The rexec is the problem.&lt;BR /&gt;Does anyone have any ideas how to resolve this?</description>
      <pubDate>Mon, 08 Nov 2004 06:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417060#M640128</guid>
      <dc:creator>Mark Cater_2</dc:creator>
      <dc:date>2004-11-08T06:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417061#M640129</link>
      <description>Hi,&lt;BR /&gt;Check the follwoing entry in inetd.conf. If it is commented then uncomment it and rerun the inetd daemon.&lt;BR /&gt;&lt;BR /&gt;exec stream tcp6 nowait root /usr/lbin/rexecd   rexecd&lt;BR /&gt;&lt;BR /&gt;Use "# /usr/sbin/inetd -c" to make inetd daemon reread the configuration file.&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;Regards,</description>
      <pubDate>Mon, 08 Nov 2004 06:33:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417061#M640129</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-11-08T06:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417062#M640130</link>
      <description>thanks for reply but its already uncommented.</description>
      <pubDate>Mon, 08 Nov 2004 06:39:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417062#M640130</guid>
      <dc:creator>Mark Cater_2</dc:creator>
      <dc:date>2004-11-08T06:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417063#M640131</link>
      <description>HI,&lt;BR /&gt;Did u configured .rhosts or /etc/hosts.equiv file properly.&lt;BR /&gt;See Man .rhosts and hosts.equiv.&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Nov 2004 06:53:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417063#M640131</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-11-08T06:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417064#M640132</link>
      <description>rexec does not use .rhosts or /etc/hosts.equiv files. It uses .netrc file in user's home directory.&lt;BR /&gt;&lt;BR /&gt;man netrc for details. set it up and it should work. Also use you rexec as follows for clarity and ease of management.&lt;BR /&gt;&lt;BR /&gt;rexec "host" -l "user_name" -n "command" Also your second rexec will not work, because, there is no way on lpadmin on remote host to know what is UNIX_Q. What you will have to do is somehow put details about UNIX_Q into a file on remote hots and use it from there.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Mon, 08 Nov 2004 07:08:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417064#M640132</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-11-08T07:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417065#M640133</link>
      <description>sorry mark..&lt;BR /&gt;RAC is right, rexec uses .netrc for user authentication and remsh uses rhosts or host.equiv file....</description>
      <pubDate>Mon, 08 Nov 2004 07:15:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417065#M640133</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-11-08T07:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417066#M640134</link>
      <description>thansk for replies. I might have made an error with copy and paste.&lt;BR /&gt;The script works - lp, etc all works. the problem is that rexec will only run the for loop once.&lt;BR /&gt;comment the rexec and it all works fine.&lt;BR /&gt;So rexec must send an exit signal for the for loop???</description>
      <pubDate>Mon, 08 Nov 2004 07:23:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417066#M640134</guid>
      <dc:creator>Mark Cater_2</dc:creator>
      <dc:date>2004-11-08T07:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417067#M640135</link>
      <description>I think using remsh instead of rexec will solve your problem.&lt;BR /&gt;Regards,</description>
      <pubDate>Mon, 08 Nov 2004 07:27:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/3417067#M640135</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-11-08T07:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: script problem (rexec/remsh in loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5495745#M640136</link>
      <description>&lt;P&gt;&amp;gt;the problem is that rexec will only run the for loop once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As mentioned in the fine print of RAC's reply, you need to use -n, otherwise rexec/remsh/ssh, will eat up the stdin that is driving the for-loop or while loop.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2012 03:29:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5495745#M640136</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-01-16T03:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5497163#M640137</link>
      <description>&lt;P&gt;You need to trace the script's actions since you didn't supply any messages that come from the script. After the the first line, add the line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set -x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now each step of the script will be shown and you can see what each step is doing.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2012 15:22:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5497163#M640137</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2012-01-16T15:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5500863#M640138</link>
      <description>&lt;P&gt;Your problem seems an "exit" gived by "rexec" directly on the ksh process&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should try to replace every line of rexec with this:&lt;BR /&gt;&lt;BR /&gt;rc=`rexec&amp;nbsp;&amp;nbsp;&amp;nbsp; etc etc.. `&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this way "rexec" will be executed by another process&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 16:03:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5500863#M640138</guid>
      <dc:creator>Riccardo_Marini</dc:creator>
      <dc:date>2012-01-18T16:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: script problem (rexec/remsh in loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5501331#M640139</link>
      <description>&lt;P&gt;&amp;gt;You need to trace the script's actions since you didn't supply any messages that come from the script. ...&lt;/P&gt;&lt;P&gt;&amp;gt;Your problem seems an "exit" given by "rexec" directly on the ksh process ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You guys didn't believe me when I said the problem was with missing -n? ;-)&lt;/P&gt;&lt;P&gt;That's the whole reason I replied to this old thread, nobody explicitly mention why -n would fix it.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2012 01:54:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/5501331#M640139</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-01-19T01:54:02Z</dc:date>
    </item>
  </channel>
</rss>

