<?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: Keeping PS1 same in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369929#M347178</link>
    <description>In our PowerBroker setup looks like &lt;BR /&gt;'su-username' is mandatory. I just tried and it is not taking without "-".</description>
    <pubDate>Mon, 02 Mar 2009 19:49:56 GMT</pubDate>
    <dc:creator>Shivkumar</dc:creator>
    <dc:date>2009-03-02T19:49:56Z</dc:date>
    <item>
      <title>Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369927#M347176</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am using PS1 environment variable in .profile to see servername and my home directories etc.&lt;BR /&gt;&lt;BR /&gt;export PS1="$(uname -n)@$(whoami)\$PWD&amp;gt;"&lt;BR /&gt;&lt;BR /&gt;But when i execute PowerBroker command to su to different user then this PS1 setting gets lost.&lt;BR /&gt;&lt;BR /&gt;Is there a way to retain it even if i change to different user ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Mar 2009 19:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369927#M347176</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2009-03-02T19:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369928#M347177</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But when i execute PowerBroker command to su to different user then this PS1 setting gets lost.  Is there a way to retain it even if i change to different user ?&lt;BR /&gt;&lt;BR /&gt;If you 'su - username' then you are sourcing the user's profile.  This is going to reset or set its own PS1 environmental variable.&lt;BR /&gt;&lt;BR /&gt;If you 'su username' _without_ the dash (hyphen) then 'su' does _not_ source the target user's profile, leaving your current environment unchanged.&lt;BR /&gt;&lt;BR /&gt;See the 'su' manpages for more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Mar 2009 19:37:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369928#M347177</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-03-02T19:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369929#M347178</link>
      <description>In our PowerBroker setup looks like &lt;BR /&gt;'su-username' is mandatory. I just tried and it is not taking without "-".</description>
      <pubDate>Mon, 02 Mar 2009 19:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369929#M347178</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2009-03-02T19:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369930#M347179</link>
      <description>Shiv:&amp;gt;  In our PowerBroker setup looks like &lt;BR /&gt;'su - username' is mandatory. I just tried and it is not taking without "-".&lt;BR /&gt;&lt;BR /&gt;If this is the case, then your PS1 value will be reset to whatever value the .profile and other login scripts for 'username' use for PS1.  You cannot use the "-" for a login shell while *not* having the login scripts executed.  The use of "-" on su will force PS1 to be changed if the other user's login scripts change it, period.</description>
      <pubDate>Mon, 02 Mar 2009 19:55:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369930#M347179</guid>
      <dc:creator>Michael Mike Reaser</dc:creator>
      <dc:date>2009-03-02T19:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369931#M347180</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; In our PowerBroker setup looks like &lt;BR /&gt;'su-username' is mandatory. I just tried and it is not taking without "-".&lt;BR /&gt;&lt;BR /&gt;You need to find out what environmental variables are needed in the target environment; place them in a stand-alone file; and source (read) them once you have switched users.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 02 Mar 2009 19:57:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369931#M347180</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-03-02T19:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369932#M347181</link>
      <description>&amp;gt;JRF: You need to find out what environmental variables are needed in the target&lt;BR /&gt;&lt;BR /&gt;Or the reverse, find out what sets PS1 and source that after you use PowerBroker.&lt;BR /&gt;&lt;BR /&gt;For me, my PS1 is always "$ ".  I have a pushd/popd functions that puts the directory path in the window title.</description>
      <pubDate>Tue, 03 Mar 2009 04:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369932#M347181</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-03T04:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping PS1 same</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369933#M347182</link>
      <description>Please add this variable in /etc/profile and make sure that PS1 variable is not defined in .profile of users.&lt;BR /&gt;&lt;BR /&gt;This above setting will be set for all the users.&lt;BR /&gt;&lt;BR /&gt;First /etc/profile executes and then .profile of user. Hence whatever defined in .profile will override variables defined in /etc/profile</description>
      <pubDate>Tue, 03 Mar 2009 05:12:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keeping-ps1-same/m-p/4369933#M347182</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2009-03-03T05:12:29Z</dc:date>
    </item>
  </channel>
</rss>

