<?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: startup (rc) script for non root user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423325#M403</link>
    <description>"who am i" doesn't work like that.  That command will examine /dev/tty to find the current terminal and then match the utmp record to see who logged in at that terminal.  &lt;BR /&gt;&lt;BR /&gt;In the case of processes that are run in the start-up scripts, there is no attached terminal.  "who am i" should fail if things are working correctly.  A similiar result would occur if you did "who am i" via remsh.&lt;BR /&gt;&lt;BR /&gt;There is a "whoami" which just looks at the process' uid.  But scripts that run via the start-up scripts should simply not be using "who am i" or any other terminal related commands.&lt;BR /&gt;&lt;BR /&gt;We use "su - user" a lot in our start-up scripts and they all work fine.</description>
    <pubDate>Wed, 17 May 2000 20:23:14 GMT</pubDate>
    <dc:creator>Paul Hite</dc:creator>
    <dc:date>2000-05-17T20:23:14Z</dc:date>
    <item>
      <title>startup (rc) script for non root user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423322#M400</link>
      <description>I would like to have a startup script start a process for a non root user.  I would like the real user id, not just the effective user id, to be that of the user.  Therefore I believe "su - user" is not an option.  Is there any way to do this?</description>
      <pubDate>Wed, 17 May 2000 17:48:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423322#M400</guid>
      <dc:creator>David Makowsky</dc:creator>
      <dc:date>2000-05-17T17:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: startup (rc) script for non root user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423323#M401</link>
      <description>"su - user" will set the real uid of the process to user.  &lt;BR /&gt;&lt;BR /&gt;If the process itself had the set-uid set and was owned by user but then run by root, then the process would have a real-uid of root but an effective-uid of user.&lt;BR /&gt;&lt;BR /&gt;But the su command uses the setuid(2) system call set set the uid.  So this will do what you want.</description>
      <pubDate>Wed, 17 May 2000 19:28:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423323#M401</guid>
      <dc:creator>Paul Hite</dc:creator>
      <dc:date>2000-05-17T19:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: startup (rc) script for non root user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423324#M402</link>
      <description>Let me rephrase what I am after. I login under a user account, say user abc, and then do a "su - def".  I then type "whoami".   I will see "def".  However, if I type "who am i" (with spaces), I will see "abc".  This is in fact why I (apparently mistakenly) believed that the "su -" would not change the real user id.&lt;BR /&gt;&lt;BR /&gt;What I would like, and I am afraid this is going to sound confusing, is for a startup script to call a user process.  If the user process were to do a "who am i" (with spaces) the return would not be root but would be the user id.</description>
      <pubDate>Wed, 17 May 2000 19:55:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423324#M402</guid>
      <dc:creator>David Makowsky</dc:creator>
      <dc:date>2000-05-17T19:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: startup (rc) script for non root user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423325#M403</link>
      <description>"who am i" doesn't work like that.  That command will examine /dev/tty to find the current terminal and then match the utmp record to see who logged in at that terminal.  &lt;BR /&gt;&lt;BR /&gt;In the case of processes that are run in the start-up scripts, there is no attached terminal.  "who am i" should fail if things are working correctly.  A similiar result would occur if you did "who am i" via remsh.&lt;BR /&gt;&lt;BR /&gt;There is a "whoami" which just looks at the process' uid.  But scripts that run via the start-up scripts should simply not be using "who am i" or any other terminal related commands.&lt;BR /&gt;&lt;BR /&gt;We use "su - user" a lot in our start-up scripts and they all work fine.</description>
      <pubDate>Wed, 17 May 2000 20:23:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423325#M403</guid>
      <dc:creator>Paul Hite</dc:creator>
      <dc:date>2000-05-17T20:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: startup (rc) script for non root user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423326#M404</link>
      <description>if you use the following syntax &lt;BR /&gt;&lt;BR /&gt;su - oracle -c script&lt;BR /&gt;&lt;BR /&gt;in you rc files it should run the script as the effective user i.e oracle</description>
      <pubDate>Wed, 17 May 2000 23:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-rc-script-for-non-root-user/m-p/2423326#M404</guid>
      <dc:creator>Anthony Goonetilleke</dc:creator>
      <dc:date>2000-05-17T23:16:29Z</dc:date>
    </item>
  </channel>
</rss>

