<?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: Assign  root privileges  to an other user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516884#M871561</link>
    <description>Hi,&lt;BR /&gt;chmod +s is only valid for executables.&lt;BR /&gt;You could indeed used sudo,&lt;BR /&gt;or you can write &amp;amp; compile a little C-script which simply executes your shell script, and then chmod +s the C-executable.&lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.</description>
    <pubDate>Fri, 13 Apr 2001 10:26:40 GMT</pubDate>
    <dc:creator>Thierry Poels_1</dc:creator>
    <dc:date>2001-04-13T10:26:40Z</dc:date>
    <item>
      <title>Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516883#M871560</link>
      <description>Hi, &lt;BR /&gt;I need to assign the permission of execution of one shell script to an only user (beyond root).&lt;BR /&gt;The owner of this shell script is root.&lt;BR /&gt;This script executes various commands (It kills processes of which the owner is root, It changes the permissions to some files of which he is not owner, etc...).&lt;BR /&gt;I've tried with the command 'chmod +s myscript' but it has not worked.&lt;BR /&gt;Some errors:  &lt;BR /&gt;chmod: Not owner&lt;BR /&gt;kill: PID: permission denied&lt;BR /&gt;&lt;BR /&gt;Notes: I can't use "sudo" (It's not supported by HP)!!!&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Sergio&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Apr 2001 10:07:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516883#M871560</guid>
      <dc:creator>Sergio Tancredi</dc:creator>
      <dc:date>2001-04-13T10:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516884#M871561</link>
      <description>Hi,&lt;BR /&gt;chmod +s is only valid for executables.&lt;BR /&gt;You could indeed used sudo,&lt;BR /&gt;or you can write &amp;amp; compile a little C-script which simply executes your shell script, and then chmod +s the C-executable.&lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.</description>
      <pubDate>Fri, 13 Apr 2001 10:26:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516884#M871561</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-04-13T10:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516885#M871562</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I can think of one other way, but sudo (even I think that sudo would do great because if gives you a monitoring feature as well).&lt;BR /&gt;&lt;BR /&gt;Start restricted sam and set it up through sam.&lt;BR /&gt;Restricted sam is started with&lt;BR /&gt;&lt;BR /&gt;#sam -r&lt;BR /&gt;&lt;BR /&gt;Steffi Jones</description>
      <pubDate>Fri, 13 Apr 2001 12:35:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516885#M871562</guid>
      <dc:creator>Steffi Jones_1</dc:creator>
      <dc:date>2001-04-13T12:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516886#M871563</link>
      <description>You need to be the owner of the file to do a chmod, if the file is owned by root, which I assume it is, then become root, and do a chmod 4755. this will set the SETUID bit, and whoever executes this command will cause it to run as if root ran it..just like the passwd command. make sure that nobody else can write to this file, and the script should work.&lt;BR /&gt;also chmod u+s file will work.</description>
      <pubDate>Fri, 13 Apr 2001 15:41:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516886#M871563</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-04-13T15:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516887#M871564</link>
      <description>Kevin, Sergio is refering to a shell script.  Shell scripts cannot have the sticky bit set.</description>
      <pubDate>Fri, 13 Apr 2001 15:55:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516887#M871564</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-04-13T15:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516888#M871565</link>
      <description>Hi,&lt;BR /&gt;I do not agree with Thierry Poels.&lt;BR /&gt;chmod +s is valid for scripts also.&lt;BR /&gt;You have to insert the first line:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;and suid works.&lt;BR /&gt;Piotr</description>
      <pubDate>Fri, 13 Apr 2001 18:44:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516888#M871565</guid>
      <dc:creator>Piotr Bronisz</dc:creator>
      <dc:date>2001-04-13T18:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516889#M871566</link>
      <description>I just thought that I would add my few pennies to this.  In addition to ensuring that the suid is set i.e 4755, the script needs to be owned by root.  This executes all commands with an euid of 0 when the script is run.&lt;BR /&gt;&lt;BR /&gt;In general, suid scripts and programs do represent a security risk.  I myself only use the root suid on programs written in C if absolutely necessary.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Joseph.</description>
      <pubDate>Sun, 15 Apr 2001 23:31:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516889#M871566</guid>
      <dc:creator>Joseph A Benaiah_1</dc:creator>
      <dc:date>2001-04-15T23:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516890#M871567</link>
      <description>I have taken a slightly different approach to solving this problem in our environment, and this works:&lt;BR /&gt;&lt;BR /&gt;Create a new group whose only member is this userid you want empowered.  (Alternatively, I use the built-in group "adm" for administration purposes)&lt;BR /&gt;&lt;BR /&gt;chown root:&lt;RESTRICTED-GROUP&gt; &lt;FILENAME&gt;&lt;BR /&gt;chmod 4750 &lt;FILENAME&gt;&lt;/FILENAME&gt;&lt;BR /&gt;This allows members of this restricted group to execute the script which runs as root (from the sticky bit).&lt;BR /&gt;&lt;BR /&gt;I use it for one of my applications that opens port and needs root ownership when running.&lt;BR /&gt;&lt;BR /&gt;Hope this helps...&lt;BR /&gt;  Ed Ulfers&lt;/FILENAME&gt;&lt;/RESTRICTED-GROUP&gt;</description>
      <pubDate>Tue, 17 Apr 2001 17:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516890#M871567</guid>
      <dc:creator>Ed Ulfers</dc:creator>
      <dc:date>2001-04-17T17:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516891#M871568</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have tried with sam -r but I would prefer that the user in issue assumes root privileges only during the execution of the shell-script.&lt;BR /&gt;&lt;BR /&gt;The better thing could be the C-script.&lt;BR /&gt;Could you give me more details about this?&lt;BR /&gt;&lt;BR /&gt;Thanks to everyone, &lt;BR /&gt;Sergio&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Apr 2001 09:50:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516891#M871568</guid>
      <dc:creator>Sergio Tancredi</dc:creator>
      <dc:date>2001-04-18T09:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516892#M871569</link>
      <description>Hi Sergio,&lt;BR /&gt;&lt;BR /&gt;I am using sudo with HP-UX 10.20 and 11.0 and it's OK. I think that this is a very good solution.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Manuel</description>
      <pubDate>Wed, 18 Apr 2001 10:07:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516892#M871569</guid>
      <dc:creator>Manuel Plaza</dc:creator>
      <dc:date>2001-04-18T10:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516893#M871570</link>
      <description>Well, other than C-Shell there is really no such thing as C-Script!  C-Shell is not too much different than borne or korn shell!&lt;BR /&gt;&lt;BR /&gt;What was being referred to is a C Program.  It is relatively easy to use the system() in C to call a standard command.  It gets a bit more complex to have this program and what it runs to run as root.&lt;BR /&gt;&lt;BR /&gt;C executes very fast, and has the ability to control all aspects of the environment it is running in.  You also have security in the fact that unless you give away your source code, noone can see what is going on.  Unlike a script where a user has to have read access.  A smart user could potentially use this to do lots of damage to your system!&lt;BR /&gt;&lt;BR /&gt;If your not familiar with Unix C programming, then this will not be easy.  If you have no C experience/knowlege at all, then your pretty much SOL cuz it will not be quick and dirty to learn.&lt;BR /&gt;&lt;BR /&gt;Advice.  Take C class, then Unix C programming.  HP has some nice classes for this, as do lots of Universities.  &lt;BR /&gt;&lt;BR /&gt;If you need quick answers, then stick with the scripting for now and follow the advice of others.  Or hire a consultant/developer to make the program for you.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Wed, 18 Apr 2001 10:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516893#M871570</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2001-04-18T10:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516894#M871571</link>
      <description>okay, a little bit more detail :&lt;BR /&gt;&lt;BR /&gt;create a file prog.c with following 4 lines:&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;system("/your/dir/yourscript.sh");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;then compile this little C-program:&lt;BR /&gt;cc prog.c&lt;BR /&gt;&lt;BR /&gt;this results in an executable file a.out which you might want to rename to whatever ...&lt;BR /&gt;mv a.out whatever&lt;BR /&gt;chmod +x whatever   # make it executable&lt;BR /&gt;chmod +s whatever   # set sticky bit&lt;BR /&gt;&lt;BR /&gt;Now let the user execute "whatever", and he will run "yourscript.sh" as root.&lt;BR /&gt;(and also award some points to the boys here ;)&lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Apr 2001 11:23:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516894#M871571</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-04-18T11:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign  root privileges  to an other user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516895#M871572</link>
      <description>Thanks to everyone for any help.  &lt;BR /&gt;My problem is now resolved !!!&lt;BR /&gt;:-)))&lt;BR /&gt;&lt;BR /&gt;Sergio&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Apr 2001 07:46:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assign-root-privileges-to-an-other-user/m-p/2516895#M871572</guid>
      <dc:creator>Sergio Tancredi</dc:creator>
      <dc:date>2001-04-19T07:46:31Z</dc:date>
    </item>
  </channel>
</rss>

