<?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 and SHELL environment variable in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354490#M837740</link>
    <description>could you give us a&lt;BR /&gt;# ll /bin/csh&lt;BR /&gt;on both systems ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
    <pubDate>Wed, 11 Aug 2004 09:00:47 GMT</pubDate>
    <dc:creator>Robert-Jan Goossens</dc:creator>
    <dc:date>2004-08-11T09:00:47Z</dc:date>
    <item>
      <title>su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354485#M837735</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I observe a difference between HP-UX 11.00 and&lt;BR /&gt;11.11 with the settings of the SHELL environment&lt;BR /&gt;variable when doing a su - user.&lt;BR /&gt;&lt;BR /&gt;Basically on 11.00 SHELL is set to the login&lt;BR /&gt;shell of the new user while on 11.11 the value&lt;BR /&gt;seems to be always /sbin/sh. The 11.00 behaviour is the one I would expect according&lt;BR /&gt;to the man pages of su and login.&lt;BR /&gt;&lt;BR /&gt;To illustrate:&lt;BR /&gt;&lt;BR /&gt;# uname -r&lt;BR /&gt;B.11.00&lt;BR /&gt;# useradd -s /bin/csh testusr&lt;BR /&gt;# printenv SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt;# su - testusr -c 'printenv SHELL'&lt;BR /&gt;(c)Copyright 1983-1997 Hewlett-Packard Co.,  &lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;/bin/csh&lt;BR /&gt;&lt;BR /&gt;# uname -r&lt;BR /&gt;B.11.11&lt;BR /&gt;# useradd -s /bin/csh testusr&lt;BR /&gt;# printenv SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt;# su - testusr -c 'printenv SHELL' 2&amp;gt;/dev/null&lt;BR /&gt;(c)Copyright 1983-2000 Hewlett-Packard Co.,  &lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;/sbin/sh&lt;BR /&gt;&lt;BR /&gt;Has anyone a idea why this happens? This is&lt;BR /&gt;quite annoying for csh users since the&lt;BR /&gt;usual construct of "eval `tset -s -Q`"&lt;BR /&gt;in .login files will not work any longer.&lt;BR /&gt;&lt;BR /&gt;&lt;/SNIP&gt;&lt;/SNIP&gt;</description>
      <pubDate>Wed, 11 Aug 2004 07:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354485#M837735</guid>
      <dc:creator>Stefan Hirsch_2</dc:creator>
      <dc:date>2004-08-11T07:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354486#M837736</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Are you shure that "csh" shell is placed into /bin directory in both systems?&lt;BR /&gt;&lt;BR /&gt;Pls check this in both systems with:&lt;BR /&gt;#whence csh&lt;BR /&gt;&lt;BR /&gt;The try again using the dsiplayed path. In my case "csh" shell is placed into /usr/bin/ in both systems.&lt;BR /&gt;&lt;BR /&gt;Rgds.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Aug 2004 07:58:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354486#M837736</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2004-08-11T07:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354487#M837737</link>
      <description>Hi Stefan,&lt;BR /&gt;&lt;BR /&gt;What is contained in /etc/shells on each of these systems?&lt;BR /&gt;Is it possible that /usr/bin/csh is *not* in the file on the 11.11 system?&lt;BR /&gt;If it exists then the getusershell() sys call leaves the file open &amp;amp; will step through the entries on subsequent calls.&lt;BR /&gt;man 3c getusershell &lt;BR /&gt;for details.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 11 Aug 2004 08:05:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354487#M837737</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-08-11T08:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354488#M837738</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;here is the content of /etc/shells:&lt;BR /&gt;&lt;BR /&gt;11.11&lt;BR /&gt;# grep -v \# /etc/shells&lt;BR /&gt;&lt;BR /&gt;/sbin/sh&lt;BR /&gt;/usr/bin/csh&lt;BR /&gt;/usr/bin/sh&lt;BR /&gt;/usr/bin/rsh&lt;BR /&gt;/usr/bin/ksh&lt;BR /&gt;/usr/bin/rksh&lt;BR /&gt;/usr/bin/keysh&lt;BR /&gt;/bin/csh&lt;BR /&gt;/bin/sh&lt;BR /&gt;/bin/ksh&lt;BR /&gt;/usr/bin/false&lt;BR /&gt;&lt;BR /&gt;/bin/ftp_only&lt;BR /&gt;&lt;BR /&gt;11.0&lt;BR /&gt;# grep -v \# /etc/shells&lt;BR /&gt;/sbin/sh&lt;BR /&gt;/sbin/sh&lt;BR /&gt;/usr/bin/sh&lt;BR /&gt;/usr/bin/rsh&lt;BR /&gt;/usr/bin/ksh&lt;BR /&gt;/bin/csh&lt;BR /&gt;/usr/local/bin/tcsh&lt;BR /&gt;/usr/bin/tcsh&lt;BR /&gt;&lt;BR /&gt;/bin/csh is present on both systems.&lt;BR /&gt;&lt;BR /&gt;/etc/csh.login is identical except for some&lt;BR /&gt;revision information.&lt;BR /&gt;&lt;BR /&gt;Thanks and br&lt;BR /&gt;Stefan&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Aug 2004 08:53:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354488#M837738</guid>
      <dc:creator>Stefan Hirsch_2</dc:creator>
      <dc:date>2004-08-11T08:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354489#M837739</link>
      <description>I'm not 100% sure, but after checking the su(1) and environ(5) manual page, I'd say this behaviour is a bug. &lt;BR /&gt;&lt;BR /&gt;When you use login(1) the SHELL variable is set correctly.&lt;BR /&gt;&lt;BR /&gt;I recommend to open a call with HP to address this.&lt;BR /&gt;&lt;BR /&gt;Carsten</description>
      <pubDate>Wed, 11 Aug 2004 08:58:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354489#M837739</guid>
      <dc:creator>Carsten Krege</dc:creator>
      <dc:date>2004-08-11T08:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354490#M837740</link>
      <description>could you give us a&lt;BR /&gt;# ll /bin/csh&lt;BR /&gt;on both systems ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Wed, 11 Aug 2004 09:00:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354490#M837740</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2004-08-11T09:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354491#M837741</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;here is the ls -l output:&lt;BR /&gt;&lt;BR /&gt;# uname -r&lt;BR /&gt;B.11.00&lt;BR /&gt;# ls -l /bin/csh&lt;BR /&gt;-r-xr-xr-x   1 bin        bin         163840 Jan 24  2002 /bin/csh&lt;BR /&gt;&lt;BR /&gt;# uname -r&lt;BR /&gt;B.11.11&lt;BR /&gt;# ls -l /bin/csh&lt;BR /&gt;-r-xr-xr-x   1 bin        bin         155648 Sep 20  2002 /bin/csh&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Aug 2004 09:04:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354491#M837741</guid>
      <dc:creator>Stefan Hirsch_2</dc:creator>
      <dc:date>2004-08-11T09:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354492#M837742</link>
      <description>It's important to note that there is no such directory as /bin. It was removed many years ago when HP-UX adopted the V.4 filesystem layout. However, so many users and sysadmins had code that referred to /bin, a 'transition' link was created for /bin. This is what /bin looks like:&lt;BR /&gt; &lt;BR /&gt;ll /bin&lt;BR /&gt;lr-xr-xr-t   1 root       sys              8 Nov  5  2003 /bin@ -&amp;gt; /usr/bin&lt;BR /&gt; &lt;BR /&gt;Same for /lib. Try creating the user with /usr/bin/csh. And while Linux is still languishing in the past with the older filesystem layout, it's worth using the new pathnames whenever possible. Transition links are the default right now, but HP may make these optional in a furture release.</description>
      <pubDate>Wed, 11 Aug 2004 13:11:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354492#M837742</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-08-11T13:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354493#M837743</link>
      <description>Hi *,&lt;BR /&gt;&lt;BR /&gt;as it turned out the problem is not related&lt;BR /&gt;to a difference between 11.0 and 11.11. I&lt;BR /&gt;tested it on another 11.11 machine and the&lt;BR /&gt;behaviour was ok. Seems to be a missing patch&lt;BR /&gt;on the machine I tested first. Since this&lt;BR /&gt;environment is no longer available to me&lt;BR /&gt;I cannot investigate it any further.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the replies.&lt;BR /&gt;&lt;BR /&gt;Stefan</description>
      <pubDate>Tue, 17 Aug 2004 11:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354493#M837743</guid>
      <dc:creator>Stefan Hirsch_2</dc:creator>
      <dc:date>2004-08-17T11:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354494#M837744</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;I'm back with this old issue. It seems that&lt;BR /&gt;I can now reproduce the problem that the&lt;BR /&gt;SHELL environment variable is not set&lt;BR /&gt;during a su - &lt;USER&gt;.&lt;BR /&gt;&lt;BR /&gt;# uname -r&lt;BR /&gt;B.11.11&lt;BR /&gt;# useradd -s /usr/bin/csh tstusr1&lt;BR /&gt;# printenv SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt;# su - tstusr1 -c 'printenv SHELL'&lt;BR /&gt;(c)Copyright 1983-2000 Hewlett-Packard Co.,  &lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;/sbin/sh&lt;BR /&gt;&lt;BR /&gt;But this happens only when I'm logged in via&lt;BR /&gt;ssh. When logged in via rlogin on the same&lt;BR /&gt;machine the output of the printenv command&lt;BR /&gt;is the expected&lt;BR /&gt;/usr/bin/csh&lt;BR /&gt;&lt;BR /&gt;The environment of both shells is almost identical. The differences are:&lt;BR /&gt;2a3&lt;BR /&gt;&amp;gt; SSH2_SFTP_LOG_FACILITY=-1&lt;BR /&gt;7a9,10&lt;BR /&gt;&amp;gt; USER=root&lt;BR /&gt;&amp;gt; DISPLAY=10.80.5.181:13.0&lt;BR /&gt;8a12&lt;BR /&gt;&amp;gt; SSH2_CLIENT=10.80.5.240 57514 10.80.5.181 22&lt;BR /&gt;i.e. the ssh shell has some more environment variables set.&lt;BR /&gt;&lt;BR /&gt;Thanks for hints.&lt;/SNIP&gt;&lt;/USER&gt;</description>
      <pubDate>Tue, 11 Jan 2005 13:00:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354494#M837744</guid>
      <dc:creator>Stefan Hirsch_2</dc:creator>
      <dc:date>2005-01-11T13:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: su and SHELL environment variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354495#M837745</link>
      <description>Hi *,&lt;BR /&gt;&lt;BR /&gt;just for the record. The problem occured only&lt;BR /&gt;when logged in via ssh from Tectia, version&lt;BR /&gt;4.1.*. It does not appear with newer ssh versions either from Tectia or HP provided ssh versions. However, the problem is a bug in su. I've got a patched su version from HP support but there is no official patch.&lt;BR /&gt;&lt;BR /&gt;BR&lt;BR /&gt;Stefan Hirsch</description>
      <pubDate>Tue, 07 Jun 2005 01:35:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-and-shell-environment-variable/m-p/3354495#M837745</guid>
      <dc:creator>Stefan Hirsch_2</dc:creator>
      <dc:date>2005-06-07T01:35:05Z</dc:date>
    </item>
  </channel>
</rss>

