<?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: setuid problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061190#M743871</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;HP-UX doesn't allow 'setuid' scripts by default.  If you want to use this technique, you must create a 'setuid' C-wrapper around your script.&lt;BR /&gt;&lt;BR /&gt;See here for more information:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60105/secure_sid_scripts.5.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60105/secure_sid_scripts.5.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Thu, 02 Aug 2007 06:44:35 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-08-02T06:44:35Z</dc:date>
    <item>
      <title>setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061189#M743870</link>
      <description>Hi ,&lt;BR /&gt;i have a question ...&lt;BR /&gt;I use setuid with a my script for a user.&lt;BR /&gt;The script belong to oracle:oinstall and have this permission :&lt;BR /&gt;-rwsr-sr-x   1 oracle     oinstall        22 Aug  8 12:49 pippo.sh&lt;BR /&gt;I launch this script with user test.&lt;BR /&gt;If i chek whith ps -ef :&lt;BR /&gt;&lt;BR /&gt;ps -ef |grep -i pippo.sh&lt;BR /&gt;    test  8484  8461  0 13:54:39 pts/tb    0:00 /bin/ksh ./pippo.sh&lt;BR /&gt;    test  8504  8461  1 13:54:54 pts/tb    0:00 grep -i pippo.sh&lt;BR /&gt;I look that the process belong to test user and not oracle.&lt;BR /&gt;In SOLARIS this same test of setuid , and the process belong to oracle.&lt;BR /&gt;&lt;BR /&gt;Thereis a procedure o configuration file or parameter in hpux for setuid to have a same solaris result &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HELP me MANY POINT at all</description>
      <pubDate>Thu, 02 Aug 2007 06:27:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061189#M743870</guid>
      <dc:creator>gigiz</dc:creator>
      <dc:date>2007-08-02T06:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061190#M743871</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;HP-UX doesn't allow 'setuid' scripts by default.  If you want to use this technique, you must create a 'setuid' C-wrapper around your script.&lt;BR /&gt;&lt;BR /&gt;See here for more information:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60105/secure_sid_scripts.5.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60105/secure_sid_scripts.5.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 02 Aug 2007 06:44:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061190#M743871</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-08-02T06:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061191#M743872</link>
      <description>What about the slightly more comfortable wrapper sudo?&lt;BR /&gt;&lt;BR /&gt;Can be found as part of the Internet Express,&lt;BR /&gt;installs in a minute, and another 3 minutes for editing your "wrapper" rule.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111" target="_blank"&gt;http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111&lt;/A&gt;</description>
      <pubDate>Thu, 02 Aug 2007 07:37:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061191#M743872</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-08-02T07:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061192#M743873</link>
      <description>Ok &lt;BR /&gt;but JAMES,&lt;BR /&gt;how i use the setuid script ???&lt;BR /&gt;help me step by step thanks</description>
      <pubDate>Thu, 02 Aug 2007 08:17:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061192#M743873</guid>
      <dc:creator>gigiz</dc:creator>
      <dc:date>2007-08-02T08:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061193#M743874</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;If you wish to use the example provided in the manpage link in my post, copy the code therein into a secure place and change the define to specify *your* script's absolute path (e.g. '/usr/local/bin/pippo.sh').  If the modified code were called "pippo.c" compile it:&lt;BR /&gt;&lt;BR /&gt;# cc ./pippo.c -o ./pippo     &lt;BR /&gt;&lt;BR /&gt;...Then set the setuid and setgid bits as yuo have shown in your post:&lt;BR /&gt;&lt;BR /&gt;# chown oracle:dba ./pippo&lt;BR /&gt;# chmod 6555       ./pippo&lt;BR /&gt;&lt;BR /&gt;Now, when you execute './pippo' you will be running a setuid/setgid shell script '/usr/local/bin/pippo.sh'.&lt;BR /&gt;&lt;BR /&gt;As Ralph noted, 'sudo' is a good alternative to this, though.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 02 Aug 2007 08:48:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061193#M743874</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-08-02T08:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061194#M743875</link>
      <description>hi JAMES, but a c script filed in compiation&lt;BR /&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt; &lt;BR /&gt;#include &lt;STDLIB.H&gt; &lt;BR /&gt;#include &lt;STRING.H&gt; &lt;BR /&gt;#define SETUID_SCRIPT "/home/oracle/pippo.sh" &lt;BR /&gt;  &lt;BR /&gt;int main(int argc, char *const argv[]) &lt;BR /&gt;{ &lt;BR /&gt;    if (strcmp(argv[1], SETUID_SCRIPT) == 0) { &lt;BR /&gt;        execv(argv[1], argv+1); &lt;BR /&gt;    perror(argv[0]); &lt;BR /&gt;    } else { &lt;BR /&gt;        fprintf(stderr, "%s is not a known setuid script\n", &lt;BR /&gt;                argv[1] ? argv[1] : "unspecified-script" ); &lt;BR /&gt;    } &lt;BR /&gt;    exit(1); &lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ollio-/home/oracle -&amp;gt; cc setto.c -o ./setto&lt;BR /&gt;(Bundled) cc: "setto.c", line 6: warning 5: "const" will become a keyword.&lt;BR /&gt;(Bundled) cc: "setto.c", line 6: error 1000: Unexpected symbol: "argv".&lt;BR /&gt;(Bundled) cc: "setto.c", line 6: error 1705: Function prototypes are an ANSI feature.&lt;BR /&gt;(Bundled) cc: "setto.c", line 8: error 1588: "argv" undefined.&lt;BR /&gt;(Bundled) cc: "setto.c", line 8: error 1528: Subscript expression must combine pointer and integer.&lt;BR /&gt;(Bundled) cc: "setto.c", line 9: error 1528: Subscript expression must combine pointer and integer.&lt;BR /&gt;(Bundled) cc: "setto.c", line 10: error 1528: Subscript expression must combine pointer and integer.&lt;BR /&gt;(Bundled) cc: "setto.c", line 12: error 1588: "stderr" undefined.&lt;BR /&gt;(Bundled) cc: "setto.c", line 13: error 1528: Subscript expression must combine pointer and integer.&lt;BR /&gt;(Bundled) cc: "setto.c", line 13: error 1528: Subscript expression must combine pointer and integer.&lt;BR /&gt;(Bundled) cc: "setto.c", line 13: error 1552: First expression of ?: must be arithmetic.&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/UNISTD.H&gt;</description>
      <pubDate>Thu, 02 Aug 2007 09:37:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061194#M743875</guid>
      <dc:creator>gigiz</dc:creator>
      <dc:date>2007-08-02T09:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061195#M743876</link>
      <description>You should actually be glad that setuid scripts don't work. This has been a big security hole in HP-UX prior to 11.23. Setuid scripts are (and always have been) an accident waiting to happen. Of course, you can always change the value of the secure_sid_scripts tunable and your box will be just as bad as it was in the good old days. &lt;BR /&gt;&lt;BR /&gt;In the strictest sense, setuid scripts should have never been functional because scripts are not true executables but rather data files for an executable --- the shell in this case. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As noted, you will need to either create a wrapper or put your command under the control of sudo. Sudo is the much better choice because you have great control over who is allowed to execute what commands and the activity is logged.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Aug 2007 09:40:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061195#M743876</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-08-02T09:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061196#M743877</link>
      <description>&lt;!--!*#--&gt;Hi (again):&lt;BR /&gt;&lt;BR /&gt;Your compilation problem is due to the fact that you don't have an Ansi C compiler; only the bundled one offered free.&lt;BR /&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt; &lt;BR /&gt;#include &lt;STDLIB.H&gt; &lt;BR /&gt;#include &lt;STRING.H&gt; &lt;BR /&gt;#define SETUID_SCRIPT "/home/oracle/pippo.sh" &lt;BR /&gt;  &lt;BR /&gt;main(argc, argv) &lt;BR /&gt;&lt;BR /&gt;    int  argc;&lt;BR /&gt;    char **argv;&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;    if (strcmp(argv[1], SETUID_SCRIPT) == 0) { &lt;BR /&gt;        execv(argv[1], argv+1); &lt;BR /&gt;    perror(argv[0]); &lt;BR /&gt;    } else { &lt;BR /&gt;        printf("%s is not a known setuid script\n", &lt;BR /&gt;                argv[1] ? argv[1] : "unspecified-script" ); &lt;BR /&gt;    } &lt;BR /&gt;    exit(1); &lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;...should compile for you.  If you compile the code and name it 'pippo' then you run it like:&lt;BR /&gt;&lt;BR /&gt;# ./pippo /home/oracle/pippo.sh&lt;BR /&gt;&lt;BR /&gt;...having 'chmod'ed the 'pippo' executable as I first noted.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/UNISTD.H&gt;</description>
      <pubDate>Thu, 02 Aug 2007 10:08:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061196#M743877</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-08-02T10:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061197#M743878</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;it's not enough to have just the kernel compiler to compile this piece of code.&lt;BR /&gt;If you tranfer the source file to be 'Kernighan-Richie'-compliant, it will do.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 02 Aug 2007 10:16:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061197#M743878</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-08-02T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061198#M743879</link>
      <description>&amp;gt;Peter: If you tranfer the source file to be K&amp;amp;R-compliant&lt;BR /&gt;&lt;BR /&gt;Note: K&amp;amp;R isn't supported on Integrity.</description>
      <pubDate>Fri, 03 Aug 2007 04:04:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061198#M743879</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-03T04:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061199#M743880</link>
      <description>1) I have a 11.11 and not a 11.23.&lt;BR /&gt;2) the c script work but if i do  ps:&lt;BR /&gt;&lt;BR /&gt;$ id&lt;BR /&gt;uid=114(test) gid=20(users)&lt;BR /&gt;$ cd /home/oracle&lt;BR /&gt;$ ll&lt;BR /&gt;total 112&lt;BR /&gt;drwxr-xr-x   2 oracle     oinstall        96 Aug  9 10:16 TAR&lt;BR /&gt;-rw-rw-rw-   1 root       sys            422 Aug  8 17:01 ninni.c&lt;BR /&gt;-rw-------   1 root       sys              0 Aug  8 13:05 nohup.out&lt;BR /&gt;-r-sr-xr-x   1 oracle     oinstall     20480 Aug  9 11:34 pippo&lt;BR /&gt;-rw-rw-rw-   1 root       sys            423 Aug  9 11:34 pippo.c&lt;BR /&gt;-rwsr-xr-x   1 oracle     oinstall        22 Aug  8 12:49 pippo.sh&lt;BR /&gt;-rw-rw-rw-   1 root       sys            422 Aug  8 16:55 setto.c&lt;BR /&gt;$ ./pippo /home/oracle/pippo.sh &amp;amp;&lt;BR /&gt;[1]     20133&lt;BR /&gt;ps -ef |grep -i pippo          &lt;BR /&gt;    test 20133 20114  0 12:24:15 pts/ta    0:00 /bin/ksh /home/oracle/pippo.sh&lt;BR /&gt;    test 20141 20114  1 12:24:31 pts/ta    0:00 grep -i pippo&lt;BR /&gt;&lt;BR /&gt;i need that this process process belong to oracle user ...&lt;BR /&gt;thanks &lt;BR /&gt;and a poin at the finish . &lt;BR /&gt;</description>
      <pubDate>Fri, 03 Aug 2007 04:57:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061199#M743880</guid>
      <dc:creator>gigiz</dc:creator>
      <dc:date>2007-08-03T04:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061200#M743881</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the ps-output may be meaningless and NOT telling you the EUID. Add something like&lt;BR /&gt;rm -f /tmp/newfile&lt;BR /&gt;touch /tmp/newfile&lt;BR /&gt;ls -l /tmp/newfile&lt;BR /&gt;&lt;BR /&gt;in your script and check the permissions for correctness.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Fri, 03 Aug 2007 05:16:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061200#M743881</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-08-03T05:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061201#M743882</link>
      <description>test 20133 20114 0 12:24:15 pts/ta 0:00 /bin/ksh /home/oracle/pippo.sh&lt;BR /&gt;&lt;BR /&gt;&amp;gt;i need that this process process belong to oracle user&lt;BR /&gt;&lt;BR /&gt;It does.  ps(1) returns the original real user and not the effective user.&lt;BR /&gt;&lt;BR /&gt;Have your script use id(1) to check.&lt;BR /&gt;&lt;BR /&gt;Note the ps -u option works differently depending on whether you use UNIX95= or not.&lt;BR /&gt;&lt;BR /&gt;Note you can customize ps with UNIX95= by displaying both USER and RUSER.&lt;BR /&gt;&lt;BR /&gt;$ UNIX95= ps -ef -opid,user,ruser,args</description>
      <pubDate>Fri, 03 Aug 2007 05:20:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061201#M743882</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-03T05:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061202#M743883</link>
      <description>&amp;gt;Note you can customize ps with UNIX95= by displaying both USER and RUSER.&lt;BR /&gt;$ UNIX95= ps -ef -opid,user,ruser,args&lt;BR /&gt;&lt;BR /&gt;Hmm, it seems that just by using UNIX95= ps(1) displays the effective ID.  I don't see a difference between user and ruser when I use a sudo-like tool to run that ps.  I just get root.  Hmm, it happens even without UNIX95??)&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Aug 2007 05:27:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061202#M743883</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-03T05:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: setuid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061203#M743884</link>
      <description>ok</description>
      <pubDate>Fri, 03 Aug 2007 09:31:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-problem/m-p/5061203#M743884</guid>
      <dc:creator>gigiz</dc:creator>
      <dc:date>2007-08-03T09:31:22Z</dc:date>
    </item>
  </channel>
</rss>

