<?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 from root to user account does not execute .profile and set up env in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625205#M236512</link>
    <description>man 1 su&lt;BR /&gt;&lt;BR /&gt;- If the - option is specified, the new shell starts up as if the new user had initiated a new login session. If the - option is omitted, the new shell starts as if a subshell was invoked.&lt;BR /&gt;&lt;BR /&gt;Since login shells execute .profile you need to use - to make the new shell a login shell.</description>
    <pubDate>Wed, 14 Sep 2005 01:26:21 GMT</pubDate>
    <dc:creator>Orhan Biyiklioglu</dc:creator>
    <dc:date>2005-09-14T01:26:21Z</dc:date>
    <item>
      <title>su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625198#M236505</link>
      <description>On HPUX 11.23 is there a setting that would prevent root from executing a user’s .profile?&lt;BR /&gt;&lt;BR /&gt;I am running the following command:&lt;BR /&gt;su appuser -c "/home/appusers/script.sh /home/appuser"&lt;BR /&gt;&lt;BR /&gt;Where appuser is the username and the script is script.sh located in the home directory and needs to have the argument of the location afterwards. If I login as the user the .profile sets up all the environmental variables and the script runs fine, but if I run it as root through that command it does not run because its environment is not set up correctly.&lt;BR /&gt;&lt;BR /&gt;I don't think any special options need to get passed to su to run the .profile and set up the environment. I'm only having and issue on one single server. It runs fine on the others. I thought there might be some security setting somewhere preventing it but I checked /etc/default/security and they match up fine. Any ideas? Thanks!&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Sep 2005 16:13:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625198#M236505</guid>
      <dc:creator>Gus Mestousis</dc:creator>
      <dc:date>2005-09-13T16:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625199#M236506</link>
      <description>To execute the users environment, you need a dash between the su and the username&lt;BR /&gt;&lt;BR /&gt;su - username&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Sep 2005 16:19:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625199#M236506</guid>
      <dc:creator>Alan Meyer_4</dc:creator>
      <dc:date>2005-09-13T16:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625200#M236507</link>
      <description>Need that hyphen after the 'su'&lt;BR /&gt;&lt;BR /&gt;su - newuser&lt;BR /&gt;&lt;BR /&gt;With the hyphen you get the newuser env.&lt;BR /&gt;Without the hyphen you do not get the env&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Sep 2005 16:21:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625200#M236507</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-09-13T16:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625201#M236508</link>
      <description>Hi Gus ,&lt;BR /&gt;&lt;BR /&gt;You can try the following ..&lt;BR /&gt;&lt;BR /&gt;su appuser -c "/home/appusers/script.sh /home/appuser"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.</description>
      <pubDate>Tue, 13 Sep 2005 16:25:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625201#M236508</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-09-13T16:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625202#M236509</link>
      <description>oops ..I too missed the hyphen..&lt;BR /&gt;&lt;BR /&gt;# su - appuser -c "/home/appusers/script.sh /home/appuser"&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.</description>
      <pubDate>Tue, 13 Sep 2005 16:26:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625202#M236509</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-09-13T16:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625203#M236510</link>
      <description>for execute .profile, run command su - username&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-yut-</description>
      <pubDate>Tue, 13 Sep 2005 22:18:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625203#M236510</guid>
      <dc:creator>yut</dc:creator>
      <dc:date>2005-09-13T22:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625204#M236511</link>
      <description>Become user test while retaining the previously exported environment:#su test &lt;BR /&gt;&lt;BR /&gt;Become user test but change the environment to what would be expected if bin had originally logged in:#su - test</description>
      <pubDate>Tue, 13 Sep 2005 23:03:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625204#M236511</guid>
      <dc:creator>morganelan</dc:creator>
      <dc:date>2005-09-13T23:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625205#M236512</link>
      <description>man 1 su&lt;BR /&gt;&lt;BR /&gt;- If the - option is specified, the new shell starts up as if the new user had initiated a new login session. If the - option is omitted, the new shell starts as if a subshell was invoked.&lt;BR /&gt;&lt;BR /&gt;Since login shells execute .profile you need to use - to make the new shell a login shell.</description>
      <pubDate>Wed, 14 Sep 2005 01:26:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625205#M236512</guid>
      <dc:creator>Orhan Biyiklioglu</dc:creator>
      <dc:date>2005-09-14T01:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: su from root to user account does not execute .profile and set up env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625206#M236513</link>
      <description>When you are executing su appuser -c "command" from root user then, it will retain root user's exported environment settings only. &lt;BR /&gt;&lt;BR /&gt;You can feel this as,&lt;BR /&gt;&lt;BR /&gt; &lt;ROOT&gt;# su appuser -c "echo hi"&lt;BR /&gt; &lt;ROOT&gt;# hi&lt;BR /&gt;&lt;BR /&gt;When we are executing su - appuser -c "command" from root user then, it will use new user's environment settings.&lt;BR /&gt;&lt;BR /&gt;  &lt;ROOT&gt; # su - appuser -c "echo hi"&lt;BR /&gt;  &lt;PROFILE file="" execution.="" it="" is="" executing="" by=""&gt;&lt;BR /&gt;  &lt;ROOT&gt; # hi&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/ROOT&gt;&lt;/PROFILE&gt;&lt;/ROOT&gt;&lt;/ROOT&gt;&lt;/ROOT&gt;</description>
      <pubDate>Wed, 14 Sep 2005 02:43:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-from-root-to-user-account-does-not-execute-profile-and-set-up/m-p/3625206#M236513</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-14T02:43:16Z</dc:date>
    </item>
  </channel>
</rss>

