<?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: suid problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188838#M164301</link>
    <description>Maybe it's because the filesystem isn't mounted with the "suid" option.&lt;BR /&gt; &lt;BR /&gt;By the way, setuid scripts are really bad.  I mean, really bad.  Not just bad.  But  really bad....... not good.</description>
    <pubDate>Wed, 11 Feb 2004 07:33:23 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2004-02-11T07:33:23Z</dc:date>
    <item>
      <title>suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188831#M164294</link>
      <description>Please check attachment first.&lt;BR /&gt;&lt;BR /&gt;I created file /usr/bin/ra with owner root and group system.SUID is set for this file and also everybody has execute permission for this.This file containing a script to add a line in /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;Now i am loggin in as a simple user (not root) and executing file /usr/bin/ra .As per my knowledge about suid,it should work like it is executed by root user and it should add line in /etc/passwd file.But here i am getting the message --"/etc/passwd: Cannot create the specified file."&lt;BR /&gt;Pls check attachment also&lt;BR /&gt;&lt;BR /&gt;I think question is clear 4 u.Why i am getting error??  &lt;BR /&gt;  &lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2004 07:05:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188831#M164294</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-11T07:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188832#M164295</link>
      <description>I wonder if because of the special characters on that line, you're not getting this problem.. maybe you should put the line you echo within quotes.</description>
      <pubDate>Wed, 11 Feb 2004 07:12:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188832#M164295</guid>
      <dc:creator>Marco Santerre</dc:creator>
      <dc:date>2004-02-11T07:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188833#M164296</link>
      <description>It's a strange way to edit the passwd file, but if you like to do it.&lt;BR /&gt;&lt;BR /&gt;I think it has to do with that you call the binary "echo" in your script. This one has no SUID set(and you don't want to have it set!)&lt;BR /&gt;Or like Marco said put it between""&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Peter&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2004 07:17:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188833#M164296</guid>
      <dc:creator>Hoefnix</dc:creator>
      <dc:date>2004-02-11T07:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188834#M164297</link>
      <description>&lt;BR /&gt;Itried with echo with quot and without.&lt;BR /&gt;Same working when i logged in as root</description>
      <pubDate>Wed, 11 Feb 2004 07:18:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188834#M164297</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-11T07:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188835#M164298</link>
      <description>It is obvious because the echo command doesn't have SUID set.&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Wed, 11 Feb 2004 07:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188835#M164298</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-02-11T07:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188836#M164299</link>
      <description>peter,&lt;BR /&gt;&lt;BR /&gt;This is not for editing passwd file.This is sort of "hacking" .I created /usr/bin/ra when i had root passwd.Now i dont have root access in this machine.I have only simple user access.</description>
      <pubDate>Wed, 11 Feb 2004 07:20:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188836#M164299</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-11T07:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188837#M164300</link>
      <description>karthik,&lt;BR /&gt;&lt;BR /&gt;I set suid for echo command also.see permission &lt;BR /&gt;&lt;BR /&gt;-r-sr-xr-x   1 bin        bin          15084 Aug  8  2002 /usr/bin/echo&lt;BR /&gt;&lt;BR /&gt;sysadm</description>
      <pubDate>Wed, 11 Feb 2004 07:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188837#M164300</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-11T07:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188838#M164301</link>
      <description>Maybe it's because the filesystem isn't mounted with the "suid" option.&lt;BR /&gt; &lt;BR /&gt;By the way, setuid scripts are really bad.  I mean, really bad.  Not just bad.  But  really bad....... not good.</description>
      <pubDate>Wed, 11 Feb 2004 07:33:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188838#M164301</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-11T07:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188839#M164302</link>
      <description>$ ls -l /usr/bin/echo&lt;BR /&gt;-r-sr-xr-x   1 root       bin          15084 Aug  8  2002 echo&lt;BR /&gt;&lt;BR /&gt;$ ./ra&lt;BR /&gt;./ra: /etc/passwd: Cannot create the specified file.&lt;BR /&gt;$ &lt;BR /&gt; &lt;BR /&gt;still same problem&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2004 07:33:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188839#M164302</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-11T07:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188840#M164303</link>
      <description>mark,&lt;BR /&gt;filesystem mounted with suid on.because already other commands in /usr/bin with suid bit on (eg:passwd command) are working perfectly.&lt;BR /&gt;&lt;BR /&gt;sysadm</description>
      <pubDate>Wed, 11 Feb 2004 07:36:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188840#M164303</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-11T07:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188841#M164304</link>
      <description>It's worth pointing out that the "echo" you are using isprobably not /usr/bin/echo but the one that is internal to the shell.&lt;BR /&gt; &lt;BR /&gt;Can I suggest you look at usinmg "sudo" instead which you can get here.&lt;BR /&gt; &lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/&lt;/A&gt;</description>
      <pubDate>Wed, 11 Feb 2004 07:58:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188841#M164304</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-11T07:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188842#M164305</link>
      <description>Your setuid shell script doesn't work because you are missing magic header on the first line (#!/usr/bin/sh).&lt;BR /&gt;&lt;BR /&gt;You can read more about it at the following URL. Especially read about security risks involved.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html" target="_blank"&gt;http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html&lt;/A&gt;</description>
      <pubDate>Wed, 11 Feb 2004 21:31:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188842#M164305</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2004-02-11T21:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188843#M164306</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  SUID works best for the binary files. To ensure a script is running under the owner of the file, the first line of the script should read&lt;BR /&gt;&lt;BR /&gt;   #!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;-- Sundar</description>
      <pubDate>Thu, 12 Feb 2004 14:46:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188843#M164306</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-02-12T14:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188844#M164307</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;As far as I know, others shouldn't have  access to the SUID *script*. Try removing read access to the ra file. Create a group and add couple of users to it and let them try. Change the group of this script to this new group.&lt;BR /&gt;&lt;BR /&gt;$ ls -l /usr/bin/ra&lt;BR /&gt;-r-sr-x---   1 root       some_grp             50 Feb 11 14:27 /usr/bin/ra&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Thu, 12 Feb 2004 15:08:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188844#M164307</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-02-12T15:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188845#M164308</link>
      <description>L.S.&lt;BR /&gt;&lt;BR /&gt;* if your script is SUID, it will run as root, so the echo will also be running under root. It's needless to change the protections of the 'echo' file. For some shells 'echo' is a shell built-in, so changing protection of a file of that name is irrelevant too. &lt;BR /&gt;* You really should specify #!/usr/bin/sh or ksh or whatever as first line. &lt;BR /&gt;* You really should put the string to be echoed in ''' s.&lt;BR /&gt;&lt;BR /&gt;Are you really 'hacking' your way into the machine without letting the real sysadmins know?&lt;BR /&gt;&lt;BR /&gt;JP.</description>
      <pubDate>Fri, 13 Feb 2004 05:10:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188845#M164308</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-02-13T05:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188846#M164309</link>
      <description>My understanding is that scripts cannot be SETUID, only programs can.  I had this type of problem when I needed our tech support to be able to reset UID and GID permissions on files.  I had to write a simple c program as a wrapper to chmod and chown.  Those programs were then SETUID and a script was written to call them.</description>
      <pubDate>Fri, 13 Feb 2004 14:39:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188846#M164309</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2004-02-13T14:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188847#M164310</link>
      <description>Hi guys,&lt;BR /&gt;Thanks a lot for response.&lt;BR /&gt;&lt;BR /&gt;there were two reasons why it was not working.&lt;BR /&gt;1.there were no "!/usr/bin/sh" in the starting of script.&lt;BR /&gt;2.Kernel parameter "secure_sid_scripts" needs to be changed to 0 from 1 (default)&lt;BR /&gt;I am using hp-ux 11i B.11.22&lt;BR /&gt;&lt;BR /&gt;Cheers!!!!&lt;BR /&gt;sysadm&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 14 Feb 2004 06:51:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188847#M164310</guid>
      <dc:creator>sysadm_1</dc:creator>
      <dc:date>2004-02-14T06:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: suid problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188848#M164311</link>
      <description>by the way setuid is not set for others for the echo command ...&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Sun, 15 Feb 2004 02:14:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/suid-problem/m-p/3188848#M164311</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-02-15T02:14:43Z</dc:date>
    </item>
  </channel>
</rss>

