<?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: set UID in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543802#M369757</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;"Set-UID" scripts are potentially dangerous.  Current HP-UX kernels can control whether or not shell scripts are allowed to run "setuid".&lt;BR /&gt;&lt;BR /&gt;This is controlled by the kernel parameter 'secure_sid_scripts':&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60130/secure_sid_scripts.5.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60130/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, 03 Dec 2009 15:40:17 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-12-03T15:40:17Z</dc:date>
    <item>
      <title>set UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543801#M369756</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am new to HPUX.&lt;BR /&gt;while practiceing set UID in test server have some issue.&lt;BR /&gt;===================================&lt;BR /&gt;I am logged in as a root user.&lt;BR /&gt;# cat p1&lt;BR /&gt;sleep 20&lt;BR /&gt;# ll p1&lt;BR /&gt;-r-sr-xr-x   1 root       sys              9 Dec  3 10:24 p1&lt;BR /&gt;===================================&lt;BR /&gt;Now I am executing p1 as a normal user "usr1", I found that the child process has owner as "user1" but should be "root"&lt;BR /&gt;&lt;BR /&gt;$ sh p1 &amp;amp;&lt;BR /&gt;$ ps -ef| grep sleep&lt;BR /&gt;  user1 11500 11499  0 10:05:52 pts/5     0:00 sleep 20&lt;BR /&gt;&lt;BR /&gt;====================================&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Dec 2009 15:31:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543801#M369756</guid>
      <dc:creator>Harsha HR</dc:creator>
      <dc:date>2009-12-03T15:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: set UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543802#M369757</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;"Set-UID" scripts are potentially dangerous.  Current HP-UX kernels can control whether or not shell scripts are allowed to run "setuid".&lt;BR /&gt;&lt;BR /&gt;This is controlled by the kernel parameter 'secure_sid_scripts':&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60130/secure_sid_scripts.5.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60130/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, 03 Dec 2009 15:40:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543802#M369757</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-12-03T15:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: set UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543803#M369758</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. I checked the value of the said parameter, it was 1 &amp;amp; I have changed it to 0. still output remains same...&lt;BR /&gt;&lt;BR /&gt;===============================&lt;BR /&gt;&lt;BR /&gt;# kctune | grep -i secure&lt;BR /&gt;secure_sid_scripts                0  0           Immed&lt;BR /&gt;===============================&lt;BR /&gt;$ ll p1&lt;BR /&gt;-r-sr-xr-x   1 root       sys              9 Dec  3 10:24 p1&lt;BR /&gt;$ cat p1&lt;BR /&gt;sleep 20&lt;BR /&gt;$ sh p1 &amp;amp;&lt;BR /&gt;[1]     12198&lt;BR /&gt;$ ps -ef| grep sleep&lt;BR /&gt;  piyush 12199 12198  1 12:19:06 pts/3     0:00 sleep 20&lt;BR /&gt;===============================&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Dec 2009 17:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543803#M369758</guid>
      <dc:creator>Harsha HR</dc:creator>
      <dc:date>2009-12-03T17:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: set UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543804#M369759</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Add an 'id' command call before your 'sleep' to display the _effective_ userid of the process:&lt;BR /&gt;&lt;BR /&gt;# cat p1&lt;BR /&gt;id&lt;BR /&gt;sleep 20&lt;BR /&gt;&lt;BR /&gt;# chmod 4555 p1&lt;BR /&gt;&lt;BR /&gt;Too, there is no reason to do:&lt;BR /&gt;&lt;BR /&gt;# sh p1&lt;BR /&gt;&lt;BR /&gt;Instead, skip the extra shell and do:&lt;BR /&gt;&lt;BR /&gt;# ./p1&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 03 Dec 2009 17:42:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543804#M369759</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-12-03T17:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: set UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543805#M369760</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;This is the output...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;============================&lt;BR /&gt;$ cat p1&lt;BR /&gt;id&lt;BR /&gt;sleep 20&lt;BR /&gt;$ ./p1&lt;BR /&gt;uid=107(user1) gid=1001(b)&lt;BR /&gt;============================&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Dec 2009 18:22:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543805#M369760</guid>
      <dc:creator>Harsha HR</dc:creator>
      <dc:date>2009-12-03T18:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: set UID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543806#M369761</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;On a system that allows 'setuid' shell scripts, your output should look something like:&lt;BR /&gt;&lt;BR /&gt;$ ./p1&lt;BR /&gt;uid=1000(jrf) gid=20(users) euid=0(root)&lt;BR /&gt;&lt;BR /&gt;Notice that this works if you don't impose another subshell by running 'sh p1'.&lt;BR /&gt;&lt;BR /&gt;The fact that you don't show the effective ID field suggests something is amiss.  Verify that your latest change as the 'setuid' bit set on the script; that the script is owned by 'root'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 03 Dec 2009 18:48:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-uid/m-p/4543806#M369761</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-12-03T18:48:02Z</dc:date>
    </item>
  </channel>
</rss>

