<?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: Running RC script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036364#M905985</link>
    <description>A practical, though less humorous answer.&lt;BR /&gt;&lt;BR /&gt;To see who can run something, no matter where it is.&lt;BR /&gt;&lt;BR /&gt;Check permissions.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ll filename&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;ll /sbin/init.d/oracle&lt;BR /&gt;-rwx------ 1 root sys&lt;BR /&gt;&lt;BR /&gt;The only one that can read write or execute this script is root&lt;BR /&gt;&lt;BR /&gt;If there was an x in the second set of permissions&lt;BR /&gt;&lt;BR /&gt;-rwxr-x---&lt;BR /&gt;&lt;BR /&gt;Then other members of the sys group could also execute it.&lt;BR /&gt;&lt;BR /&gt;If it looked like this:&lt;BR /&gt;&lt;BR /&gt;-rwxr-xr-x&lt;BR /&gt;&lt;BR /&gt;Then anyone can execute it. Note you have to be able to read it to execute it. Hence the r.&lt;BR /&gt;&lt;BR /&gt;Permissions tells the whole story of who can do what on a Unix box.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Tue, 29 Jul 2003 14:53:13 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-07-29T14:53:13Z</dc:date>
    <item>
      <title>Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036359#M905980</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;I want to know who runs rc scripts... Is that always root????&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Jonathan</description>
      <pubDate>Tue, 29 Jul 2003 14:43:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036359#M905980</guid>
      <dc:creator>Jonathan Caplette_1</dc:creator>
      <dc:date>2003-07-29T14:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036360#M905981</link>
      <description>Yep.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 14:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036360#M905981</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-29T14:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036361#M905982</link>
      <description>Does a hog like slop?&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 14:47:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036361#M905982</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-07-29T14:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036362#M905983</link>
      <description>Usually, but it doesn't have to be. In /sbin/init.d you could user the setuid bit to force ownership to something other than root. I would think that doing this is NOT recommended for any of the system daemon processes.  I'd setup a simple shell script to test this before changing anything.&lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Tue, 29 Jul 2003 14:48:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036362#M905983</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2003-07-29T14:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036363#M905984</link>
      <description>yes.  one way this can be changed is to have your rc script 'su - user'</description>
      <pubDate>Tue, 29 Jul 2003 14:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036363#M905984</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-07-29T14:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036364#M905985</link>
      <description>A practical, though less humorous answer.&lt;BR /&gt;&lt;BR /&gt;To see who can run something, no matter where it is.&lt;BR /&gt;&lt;BR /&gt;Check permissions.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ll filename&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;ll /sbin/init.d/oracle&lt;BR /&gt;-rwx------ 1 root sys&lt;BR /&gt;&lt;BR /&gt;The only one that can read write or execute this script is root&lt;BR /&gt;&lt;BR /&gt;If there was an x in the second set of permissions&lt;BR /&gt;&lt;BR /&gt;-rwxr-x---&lt;BR /&gt;&lt;BR /&gt;Then other members of the sys group could also execute it.&lt;BR /&gt;&lt;BR /&gt;If it looked like this:&lt;BR /&gt;&lt;BR /&gt;-rwxr-xr-x&lt;BR /&gt;&lt;BR /&gt;Then anyone can execute it. Note you have to be able to read it to execute it. Hence the r.&lt;BR /&gt;&lt;BR /&gt;Permissions tells the whole story of who can do what on a Unix box.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 29 Jul 2003 14:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036364#M905985</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-07-29T14:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036365#M905986</link>
      <description>Note that within a given rc script, you can always do an su (and since the user is root, no passwd is needed). It's very common to do something like "su oracle -c command arg1 arg2"; however, it's generally a bad idea to su - oracle -c command arg1 arg2" because almost certainly oracle .profile will contain command which expect an interactive environemt -- which cron ain't. A better method is to have a separate file (e.g. /usr/local/bin/oraenv.sh) and have your rc script and oracle's .profile source this file (viz . /usr/local/bin/oraenv.sh) to set and export environment variables. The sources file must not contain a return or exit statement.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 14:55:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036365#M905986</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-07-29T14:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036366#M905987</link>
      <description>"Thank you.. Come again!!!"</description>
      <pubDate>Tue, 29 Jul 2003 16:09:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036366#M905987</guid>
      <dc:creator>Jonathan Caplette_1</dc:creator>
      <dc:date>2003-07-29T16:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036367#M905989</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;You create the script in /sbin/init.d/&lt;BR /&gt;that can handle parameters (start|stop|start_msg|stop_msg)&lt;BR /&gt;and in the /sbin/rcX.d/ create link to it&lt;BR /&gt;S&lt;ORDER number=""&gt;NAME &lt;BR /&gt;-&amp;gt; /sbin/init.d/&amp;lt;ScriptName&amp;gt;&lt;BR /&gt;&lt;BR /&gt;and in /sbin/rc(X-1).d/ create link to it&lt;BR /&gt;K&lt;ORDER number=""&gt;NAME &lt;BR /&gt;-&amp;gt; /sbin/init.d/&amp;lt;ScriptName&amp;gt;&lt;BR /&gt;&lt;BR /&gt;And yes it's run with root always.&lt;BR /&gt;&lt;BR /&gt;Caesar&lt;/ORDER&gt;&lt;/ORDER&gt;</description>
      <pubDate>Tue, 29 Jul 2003 19:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036367#M905989</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-07-29T19:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036368#M905991</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;please advise this.&lt;BR /&gt;$ ls -l /bin/newgrp                                                        &lt;BR /&gt;-r-sr-xr-x   1 root       bin          16384 Feb 20  2001 /bin/newgrp      &lt;BR /&gt;&lt;BR /&gt;so when I did this&lt;BR /&gt;$ newgrp dba        &lt;BR /&gt;Sorry               &lt;BR /&gt;&lt;BR /&gt;Why???  as i have the execute on newgrp set.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 22:58:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036368#M905991</guid>
      <dc:creator>prasad_15</dc:creator>
      <dc:date>2003-07-29T22:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running RC script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036369#M905993</link>
      <description>As far as the newgrp command, it di run just fine. The problem is not "Execute permission denied", the error was "sorry" which is not meaningful but it was newgrp's way to tell you that your username is not listed in /etc/group with the user dba. Have the system administrator add your username to /etc/group for the dba group.&lt;BR /&gt;&lt;BR /&gt;However, newgrp is archaic today. For 10.20 your sysadmin can create a symlink between /etc/group and /etc/logingroup. For 11.0 and higher, the link is not needed. /etc/group needs to have ONLY alternate group membership listed, not the primary group as this is found in /etc/passwd. This simplifies the passwd file.&lt;BR /&gt;&lt;BR /&gt;To see what groups your login belongs to, use the command: id</description>
      <pubDate>Wed, 30 Jul 2003 00:41:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-rc-script/m-p/3036369#M905993</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-07-30T00:41:14Z</dc:date>
    </item>
  </channel>
</rss>

