<?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: different environment setting Logging locally and remotely in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657913#M805944</link>
    <description>When they login in remotely, how do they access the box? Is it via ssh only?&lt;BR /&gt;&lt;BR /&gt;If so, here one way you could do it in their .profile...&lt;BR /&gt;&lt;BR /&gt;ENV_REMOTE=/path/.shrc_remote&lt;BR /&gt;ENV_LOCAL=/path/.shrc_local&lt;BR /&gt;if [ "${SSH_TTY}X" != "X" ];then&lt;BR /&gt;ENV=$ENV_LOCAL&lt;BR /&gt;else&lt;BR /&gt;ENV=$ENV_REMOTE&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;-denver</description>
    <pubDate>Wed, 26 Oct 2005 05:48:27 GMT</pubDate>
    <dc:creator>Denver Osborn</dc:creator>
    <dc:date>2005-10-26T05:48:27Z</dc:date>
    <item>
      <title>different environment setting Logging locally and remotely</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657912#M805943</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;  If I want the same user to have different environment setting when they login locally and remotely, how can I acheive this?&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Henry</description>
      <pubDate>Wed, 26 Oct 2005 05:33:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657912#M805943</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-10-26T05:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: different environment setting Logging locally and remotely</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657913#M805944</link>
      <description>When they login in remotely, how do they access the box? Is it via ssh only?&lt;BR /&gt;&lt;BR /&gt;If so, here one way you could do it in their .profile...&lt;BR /&gt;&lt;BR /&gt;ENV_REMOTE=/path/.shrc_remote&lt;BR /&gt;ENV_LOCAL=/path/.shrc_local&lt;BR /&gt;if [ "${SSH_TTY}X" != "X" ];then&lt;BR /&gt;ENV=$ENV_LOCAL&lt;BR /&gt;else&lt;BR /&gt;ENV=$ENV_REMOTE&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;-denver</description>
      <pubDate>Wed, 26 Oct 2005 05:48:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657913#M805944</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2005-10-26T05:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: different environment setting Logging locally and remotely</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657914#M805945</link>
      <description>You can also use the last command in a script similar to above to verify if the access is local or remote.</description>
      <pubDate>Wed, 26 Oct 2005 07:01:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657914#M805945</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-26T07:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: different environment setting Logging locally and remotely</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657915#M805946</link>
      <description>If your users' remote logins are through ssh, as suggested by Denver, and probably state of the art nowadays, you could also configure your hosts' ssh servers to honour users' environment by enabling this&lt;BR /&gt;  &lt;BR /&gt;e.g.&lt;BR /&gt;  &lt;BR /&gt;# grep ^PermitUserEnv /opt/ssh/etc/sshd_config&lt;BR /&gt;PermitUserEnvironment yes&lt;BR /&gt;  &lt;BR /&gt;Then you can either place the setting of environment variables in the leading option fields of the user's public key (repeated environment option possible)&lt;BR /&gt;   &lt;BR /&gt;# grep grothe .ssh/authorized_keys|head -1|cut -c1-94&lt;BR /&gt;environment="DAISY_USER=grothe",environment="LANG=C",environment="EXINIT=set ai ic sw=4 ts=4" &lt;BR /&gt;   &lt;BR /&gt;or you could create a file named $HOME/.ssh/environment&lt;BR /&gt;where you place the usual variable assignments&lt;BR /&gt;  &lt;BR /&gt;But please read the warning note in man sshd_config about possible implications of permitting users' environments (especially in respect to preloaded shared libs).</description>
      <pubDate>Wed, 26 Oct 2005 09:54:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657915#M805946</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-10-26T09:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: different environment setting Logging locally and remotely</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657916#M805947</link>
      <description>Thanks folks,&lt;BR /&gt;  But is this applicable for all unix platform light SOlaris or Linux? My system is interlink with these.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Henry&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Oct 2005 20:01:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657916#M805947</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-10-26T20:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: different environment setting Logging locally and remotely</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657917#M805948</link>
      <description>If your last question relates to setting the ssh client's environment this is OS independent, I would assume, and should work on any Unix ssh runs on.&lt;BR /&gt;(so no difference betw. hpux and solaris)</description>
      <pubDate>Thu, 27 Oct 2005 02:27:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/different-environment-setting-logging-locally-and-remotely/m-p/3657917#M805948</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-10-27T02:27:15Z</dc:date>
    </item>
  </channel>
</rss>

