<?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: Giving a shell script root priv in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743224#M68217</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I don't know your particular situation, but are you sure you want to attempt this?&lt;BR /&gt;&lt;BR /&gt;Is it not possible to just run the script as root, on a regular basis in cron, for example?&lt;BR /&gt;&lt;BR /&gt;You are talking about opening up permissions to system device files as well as mount points.&lt;BR /&gt;&lt;BR /&gt;Just my two pennies.&lt;BR /&gt;&lt;BR /&gt;Chris</description>
    <pubDate>Wed, 12 Jun 2002 16:45:52 GMT</pubDate>
    <dc:creator>Christopher McCray_1</dc:creator>
    <dc:date>2002-06-12T16:45:52Z</dc:date>
    <item>
      <title>Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743221#M68214</link>
      <description>I have a shell script that uses the mount command.  The script will be run by a regular user.  How do I give it root privelages so mount will work?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 12 Jun 2002 16:37:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743221#M68214</guid>
      <dc:creator>Mike Burk</dc:creator>
      <dc:date>2002-06-12T16:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743222#M68215</link>
      <description>It can be done, but not recommended. A tool called "sudo" allows a regular user controlled access to tasks you would set up.&lt;BR /&gt;&lt;BR /&gt;You can find it on Software Porting and Archive Centre.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 12 Jun 2002 16:42:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743222#M68215</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-12T16:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743223#M68216</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Use "sudo".&lt;BR /&gt;&lt;BR /&gt;You can download and install sudo from this link,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.6/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.6/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Jun 2002 16:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743223#M68216</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2002-06-12T16:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743224#M68217</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I don't know your particular situation, but are you sure you want to attempt this?&lt;BR /&gt;&lt;BR /&gt;Is it not possible to just run the script as root, on a regular basis in cron, for example?&lt;BR /&gt;&lt;BR /&gt;You are talking about opening up permissions to system device files as well as mount points.&lt;BR /&gt;&lt;BR /&gt;Just my two pennies.&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 12 Jun 2002 16:45:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743224#M68217</guid>
      <dc:creator>Christopher McCray_1</dc:creator>
      <dc:date>2002-06-12T16:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743225#M68218</link>
      <description>Mike-&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can script in the su command and have it pull the password from a file, but you have to be careful about security at that point.  I think that there is a trick you can do to encrypt it, but I can't get on search to look for it.&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Jun 2002 16:46:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743225#M68218</guid>
      <dc:creator>Mark Vollmers</dc:creator>
      <dc:date>2002-06-12T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743226#M68219</link>
      <description>This is my scenario:&lt;BR /&gt;&lt;BR /&gt;I have a network of 4 identical boxes.  I have an application that runs on this network.  I need to be able to mount to the other three boxes at runtime.  If a one or more boxes are down I don't want to attempt to mount them.  I tried to mount the boxes to each other at boot but if one or more boxes are down then it takes up to 20 minutes to complete the boot.  This is not an option.  My application runs from a regular user account.  My script pings the other boxes and based on the results mounts the ones that are up.&lt;BR /&gt;&lt;BR /&gt;If anyone has a better way to to this please help!</description>
      <pubDate>Wed, 12 Jun 2002 16:54:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743226#M68219</guid>
      <dc:creator>Mike Burk</dc:creator>
      <dc:date>2002-06-12T16:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743227#M68220</link>
      <description>In /etc/exports, if you change "hard" to "soft" then it will not be so strict about the host being up.&lt;BR /&gt;&lt;BR /&gt;Also you could look into "autofs" or "automount" as a way to have these services mounted on a as need basis.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 12 Jun 2002 17:00:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743227#M68220</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-12T17:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743228#M68221</link>
      <description>It sound like in the long run, implementing automount/autofs would be the way to go..&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B1031-90043/B1031-90043_top.html&amp;amp;con=/hpux/onlinedocs/B1031-90043/00/00/10-con.html&amp;amp;toc=/hpux/onlinedocs/B1031-90043/00/00/10-toc.html&amp;amp;searchterms=automount&amp;amp;queryid=20020612-110750" target="_blank"&gt;http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B1031-90043/B1031-90043_top.html&amp;amp;con=/hpux/onlinedocs/B1031-90043/00/00/10-con.html&amp;amp;toc=/hpux/onlinedocs/B1031-90043/00/00/10-toc.html&amp;amp;searchterms=automount&amp;amp;queryid=20020612-110750&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B9106-90008/B9106-90008_top.html&amp;amp;con=/hpux/onlinedocs/B9106-90008/00/00/43-con.html&amp;amp;toc=/hpux/onlinedocs/B9106-90008/00/00/43-toc.html&amp;amp;searchterms=automount&amp;amp;queryid=20020612-110750" target="_blank"&gt;http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B9106-90008/B9106-90008_top.html&amp;amp;con=/hpux/onlinedocs/B9106-90008/00/00/43-con.html&amp;amp;toc=/hpux/onlinedocs/B9106-90008/00/00/43-toc.html&amp;amp;searchterms=automount&amp;amp;queryid=20020612-110750&lt;/A&gt;</description>
      <pubDate>Wed, 12 Jun 2002 17:01:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743228#M68221</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-06-12T17:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743229#M68222</link>
      <description>I use soft mounts and it takes 20 minutes.  Hard mounts cause the boot process to hang until it sees the server.&lt;BR /&gt;&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 12 Jun 2002 17:02:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743229#M68222</guid>
      <dc:creator>Mike Burk</dc:creator>
      <dc:date>2002-06-12T17:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Giving a shell script root priv</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743230#M68223</link>
      <description>Hi Mike:&lt;BR /&gt;&lt;BR /&gt;There is a "dirty" way to achieve what you want, and I would be very careful of where, what and how you use it.  It works in most cases.  Establish your script as a 'setuid' script. Consider the script below.  You must have the interpreter declaration as shown. &lt;BR /&gt;&lt;BR /&gt;#/usr/bin/sh &lt;BR /&gt;/usr/sbin/mount /dev/vgXX/lvolY /mymountpoint&lt;BR /&gt;exit 0 &lt;BR /&gt;&lt;BR /&gt;Call the script 'mymount.sh' and do: &lt;BR /&gt;&lt;BR /&gt;# chown root:dba mymount.sh &lt;BR /&gt;# chmod 4110 mymount.sh &lt;BR /&gt;&lt;BR /&gt;Now, members of the group *dba* can execute the script, but only 'root' can read or write (modify) the it. &lt;BR /&gt;&lt;BR /&gt;To further secure this script, place it in a directory whose sticky bit is set.  This prevents non-owner's (here, root) from deleting it.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 12 Jun 2002 17:28:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/giving-a-shell-script-root-priv/m-p/2743230#M68223</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-06-12T17:28:29Z</dc:date>
    </item>
  </channel>
</rss>

