<?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: odd shell script link errorsafter login procedure update in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213850#M169042</link>
    <description>Sorry, I should have made the vi method more clear. Another way is to use cat -v &lt;SOME_SCRIPT&gt;&lt;/SOME_SCRIPT&gt;</description>
    <pubDate>Wed, 10 Mar 2004 11:31:31 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2004-03-10T11:31:31Z</dc:date>
    <item>
      <title>odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213841#M169033</link>
      <description>WE've started getting odd errors running some shell scripts.  THe only change to the system had been in an application, and some of the scripts that are called by our users .profile.  No patches or anything else.&lt;BR /&gt;&lt;BR /&gt;I have no idea what the errors mean.  Yeah, /bin/sh and /usr/bin/sh are hard linked, they have the same inode.  That's the way it's supposed to be!  &lt;BR /&gt;&lt;BR /&gt;Here's what we're seeing:&lt;BR /&gt;&lt;BR /&gt;interpreter "/bin/sh" not found&lt;BR /&gt;file link resolves to "/usr/bin/sh"</description>
      <pubDate>Tue, 09 Mar 2004 15:37:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213841#M169033</guid>
      <dc:creator>Lynne Seamans</dc:creator>
      <dc:date>2004-03-09T15:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213842#M169034</link>
      <description>Taking you at your word that NOTHING has changed other than the application and scripts, I'll take a couple of WAG's:&lt;BR /&gt;&lt;BR /&gt;1) Your scripts were copied/ftp'ed from a Windows box and have CR/LF in them rather than just LF's. Run then through dos2ux to clean that up or ftp them in ASCII mode.&lt;BR /&gt;&lt;BR /&gt;2) Your application did a chroot().&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Mar 2004 15:53:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213842#M169034</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-09T15:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213843#M169035</link>
      <description>These scripts have worked on this hp-ux 11.0 box up until this week, so i don't think the cr/lf idea applies.&lt;BR /&gt;&lt;BR /&gt;BUT, they might call an executable which does a chroot.  Where do i go with that?&lt;BR /&gt;&lt;BR /&gt;Thanks for the tip, btw.</description>
      <pubDate>Tue, 09 Mar 2004 15:57:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213843#M169035</guid>
      <dc:creator>Lynne Seamans</dc:creator>
      <dc:date>2004-03-09T15:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213844#M169036</link>
      <description>Well, the CR/LF pairs problem would exactly fit your situation and depending upon the text editor you use might not even be apparent. I'd bet on that. In any event, if there is any doubt, make copies of your files and try dos2ux. It does no harm if there are no CR/LF pairs but make sure that the executable bit is set on your output files.&lt;BR /&gt;&lt;BR /&gt;The chroot() is more subtle and the only guys who would know are the developers.&lt;BR /&gt;&lt;BR /&gt;chroot("/home/mydir");&lt;BR /&gt;now every reference to "/" would actually refer to "/home/mydir" so that "/bin/sh" would actually be "/home/mydir/bin/sh".&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Mar 2004 16:03:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213844#M169036</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-09T16:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213845#M169037</link>
      <description>Looks like the SHELL in the script or in /etc/passwd is not there or:&lt;BR /&gt;&lt;BR /&gt;the actual /bin/sh shell is not there.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;may not be right.&lt;BR /&gt;&lt;BR /&gt;You'd have more trouble if that was the case so check the scripts.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 09 Mar 2004 16:22:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213845#M169037</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-03-09T16:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213846#M169038</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;/bin/sh and /usr/bin are not hard linked, they are the same because /bin is a link to /usr/bin.&lt;BR /&gt;Please post ls -lisad /bin /bin/sh /usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Mar 2004 17:23:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213846#M169038</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2004-03-09T17:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213847#M169039</link>
      <description>Just edit one of the problem scripts and see if there are ^M characters. If not, make sure the FIRST line of ALL your scripts is #!/usr/bin/sh or perhaps #!/usr/bin/ksh (/bin/sh and /bin/ksh have been deprecated for almost 10 years). Note that if the scripts do not start with #!/usr/bin/sh, then whatever shell you are running will attempt to interpret your script. If that checks out, then create a simple script:&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;PATH=/usr/bin&lt;BR /&gt;date&lt;BR /&gt; &lt;BR /&gt;Make this executable and run it. If this works, then check for permission changes made to / /usr /opt /dev /tmp /var. They should look like this:&lt;BR /&gt; &lt;BR /&gt;ll -d / /usr /opt /dev /tmp /var&lt;BR /&gt;drwxr-xr-x  20 root       root          8192 Feb 24 22:03 //&lt;BR /&gt;dr-xr-xr-x  16 bin        bin           8192 Feb 18 13:26 /dev/&lt;BR /&gt;dr-xr-xr-x  50 bin        bin           8192 Mar  2 12:00 /opt/&lt;BR /&gt;drwxrwxrwt   6 bin        bin           8192 Mar  9 02:01 /tmp/&lt;BR /&gt;dr-xr-xr-x  25 bin        bin           8192 Oct 24 13:07 /usr/&lt;BR /&gt;dr-xr-xr-x  26 bin        bin           8192 Dec 17 08:23 /var/</description>
      <pubDate>Tue, 09 Mar 2004 21:58:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213847#M169039</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-03-09T21:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213848#M169040</link>
      <description>Wow, thanks for all the help and interest!&lt;BR /&gt;&lt;BR /&gt;(1)  Micheal is absolutely correct about the links, and here is the command he asked to see:&lt;BR /&gt; ls -lisad /bin /bin/sh /usr/bin/sh&lt;BR /&gt;   908    0 lr-xr-xr-t   1 root       sys              8 Jul 27  2000 /bin -&amp;gt; /usr/bin&lt;BR /&gt; 19927  424 -r-xr-xr-x   2 bin        bin         217088 Jul  1  2003 /bin/sh&lt;BR /&gt; 19927  424 -r-xr-xr-x   2 bin        bin         217088 Jul  1  2003 /usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;(2) The ^M thing sounds possible because some of this was converted from EBCDIC text.  Unfortunately, i'm stupid and do not know how to check for a control character using vi.  I will if you tell me how :)&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Mar 2004 10:46:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213848#M169040</guid>
      <dc:creator>Lynne Seamans</dc:creator>
      <dc:date>2004-03-10T10:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213849#M169041</link>
      <description>Merely open one of the files with vi. &lt;BR /&gt;e.g. vi myfile.sh&lt;BR /&gt;&lt;BR /&gt;If the CR's are in the file, you will see "^M"; ie CR == Control-M == ASCII 13 (dec).&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Mar 2004 10:52:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213849#M169041</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-10T10:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213850#M169042</link>
      <description>Sorry, I should have made the vi method more clear. Another way is to use cat -v &lt;SOME_SCRIPT&gt;&lt;/SOME_SCRIPT&gt;</description>
      <pubDate>Wed, 10 Mar 2004 11:31:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213850#M169042</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-03-10T11:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: odd shell script link errorsafter login procedure update</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213851#M169043</link>
      <description>All:&lt;BR /&gt;&lt;BR /&gt;I was getting the same error message:&lt;BR /&gt;nterpreter "/bin/sh" not found&lt;BR /&gt;file link resolves to "/usr/bin/sh"&lt;BR /&gt;&lt;BR /&gt;when I went to run the create_depot command after I downloaded some patches from the ITRC.&lt;BR /&gt;&lt;BR /&gt;I did indeed un-zip them on my XP machine and then SFTP them over to the HP-UX 11.23 box.&lt;BR /&gt;&lt;BR /&gt;Running the command:&lt;BR /&gt;dos2ux oldfile &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;did the trick and the create_depot command then worked fine.&lt;BR /&gt;&lt;BR /&gt;thanks for the tips. I hope this helps others too. ITRC forums rock!</description>
      <pubDate>Thu, 07 Jun 2007 10:48:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/odd-shell-script-link-errorsafter-login-procedure-update/m-p/3213851#M169043</guid>
      <dc:creator>Peter A. Berger Jr.</dc:creator>
      <dc:date>2007-06-07T10:48:48Z</dc:date>
    </item>
  </channel>
</rss>

