<?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: setgid and setuid in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509735#M32006</link>
    <description>Sandeep,&lt;BR /&gt;&lt;BR /&gt;Welcome to VMS!!&lt;BR /&gt;&lt;BR /&gt;I am assuming you are doing this because there is some functionality (like running a program) that TEST is not allowed, but QA is allowed.&lt;BR /&gt;&lt;BR /&gt;The standard way to do this in VMS is to create IDENTIFIER (not user!) QA (and all others that you identify as separate functionalities to be allowed or disallowed).&lt;BR /&gt;&lt;BR /&gt;You protect the objects that are needed to perform the function to be ALLOWED by holders of the identifier, else disallowed.&lt;BR /&gt;&lt;BR /&gt;And in the authorisation, you (as in: the system manager) GRANT the relevant identifiers, say QA, to user SANDEEP and HEIN, but not to JAN. Now the first two can use the functionality QA.&lt;BR /&gt;You grant identifier ITRC to SANDEEP and JAN.&lt;BR /&gt;Result those two can do ITRC (whatever that does), and HEIN can not.&lt;BR /&gt;Next application: BLABLA&lt;BR /&gt;Grant BLABLA to HEIN, IAN, and JAN.&lt;BR /&gt;-&amp;gt; BLABLA is available to those 3, not to SANDEEP.&lt;BR /&gt;&lt;BR /&gt;-- if you are familiar with those principles, then there are refinements like DYNAMIC identifier, which can be swithced off and on, and SUBSYSTEM identifiers, which are intended to allow access to certain objects (mostly files) only WHILE executing an certain image that has that identifier, but NOT in any other way.&lt;BR /&gt;&lt;BR /&gt;All this together allows fine-grained, individually authorizable, secure, and auditable access control, with very little System Admin overhead.&lt;BR /&gt;&lt;BR /&gt;Example of that: we maintain an environment with 8000+ users, 20 different applications, (each with separate PROD, TEST, and TRAIN access, each with various authorisation levels), and 1200 separately granted projects. Om avarage 250 authorisation mutations per week.&lt;BR /&gt;&lt;BR /&gt;All done with identifiers, and requiring a total maintenance effort of less than one workday per week.&lt;BR /&gt;&lt;BR /&gt;And it is ALL fully auditted, and every application use of every single user is identifiably traced.&lt;BR /&gt;&lt;BR /&gt;Let me finish with repeating Hein's final advice:&lt;BR /&gt;&lt;BR /&gt;Please be sure to start reading up on VMS security a little.&lt;BR /&gt;&lt;BR /&gt;Success!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Mar 2005 05:28:50 GMT</pubDate>
    <dc:creator>Jan van den Ende</dc:creator>
    <dc:date>2005-03-23T05:28:50Z</dc:date>
    <item>
      <title>setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509730#M32001</link>
      <description>I am unable to change the identity of the user and the group using c system calls setgid and setuid.&lt;BR /&gt;&lt;BR /&gt;Can you please take a look and let me know what I am doing wrong ? Is their a better way to do the same ?&lt;BR /&gt;&lt;BR /&gt;I have attached my test program along with this attachement.&lt;BR /&gt;&lt;BR /&gt;Below is the output of the program.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Sandeep&lt;BR /&gt;&lt;BR /&gt;$ changeid :== $SYS$SYSDEVICE:[MYTEST.MYJOBS]changeid.exe&lt;BR /&gt;$ set process /priv= all&lt;BR /&gt;$ changeid qa&lt;BR /&gt;Original Value : uid = [8388754] and gid = [128]&lt;BR /&gt;*** qa information ***&lt;BR /&gt;pw uid  : 8388755&lt;BR /&gt;pw name : qa&lt;BR /&gt;pw dir  : SYS$SYSDEVICE:[QA]&lt;BR /&gt;pw gid  : 128&lt;BR /&gt;*** start Method1 :  changeIdentity() ***&lt;BR /&gt;start : Inside changeIdentity. uid = [8388755] and gid = [128]&lt;BR /&gt;New Value : uid = [8388754] and gid = [128]&lt;BR /&gt;end : Inside changeIdentity.&lt;BR /&gt;*** End Method1 : changeIdentity() ***&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*** start Method2 :  changeIdentity1() ***&lt;BR /&gt;start : Inside changeIdentity1. uid = [8388755] and gid = [128]&lt;BR /&gt;New Value : uid = [8388754] and gid = [128]&lt;BR /&gt;end : Inside changeIdentity1.&lt;BR /&gt;*** End Method2 : changeIdentity1() ***&lt;BR /&gt;parent done.&lt;BR /&gt;&lt;BR /&gt;PS : I am using HP OpenVMS Industry Standard 64 Operating System, Version V8.2</description>
      <pubDate>Tue, 22 Mar 2005 12:42:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509730#M32001</guid>
      <dc:creator>Sandeep_30</dc:creator>
      <dc:date>2005-03-22T12:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509731#M32002</link>
      <description>&lt;BR /&gt;Hmmm, are you in a context with POSIX IDs enabled? &lt;BR /&gt;With POSIX IDs disabled, setuid and setgid serve no function and just return succes for portability purpose.&lt;BR /&gt;&lt;BR /&gt;Does it work for you on an other VMS version?&lt;BR /&gt;&lt;BR /&gt;What problem are you trying to solve? &lt;BR /&gt;VMS has many advanced sercurity features like 'identifiers' which may be better suited to solve the 'real problem', perhpas access to an object.&lt;BR /&gt;&lt;BR /&gt;hope this helps a little,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Mar 2005 13:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509731#M32002</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-03-22T13:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509732#M32003</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;I am new to openVMS and after looking at your reply about setuid and setgid as just place-holder, I am puzzled how to port the UNIX code to OVMS ? I do not have POSIX enabled.&lt;BR /&gt;&lt;BR /&gt;The only OpenVMS machine I have is I64 - v8.2 &lt;BR /&gt;&lt;BR /&gt;Below is a brief description of what I am trying to do -&lt;BR /&gt;&lt;BR /&gt;Change users and group then either spawn or create a new process to run a file. Once the file is run change back to original user.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;eg :&lt;BR /&gt;As original user (TEST) if the .com file has a command "sh proc". The run results should be&lt;BR /&gt;&lt;BR /&gt;22-MAR-2005 13:49:37.97   User: TEST          Process ID:   0000BD8B&lt;BR /&gt;                          Node: OVMS01           Process name: "_TNA77:"&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;If I change the user (lets say QA) and  if the .com file has a command "sh proc". The run should results in&lt;BR /&gt;&lt;BR /&gt;22-MAR-2005 13:49:37.97   User: QA      Process ID:   0000B231&lt;BR /&gt;                          Node: OVMS01           Process name: "_TNA78:"&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;Is their a way to accomplish this ? Does this explaination help ?&lt;BR /&gt;&lt;BR /&gt;Sandeep&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Mar 2005 14:54:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509732#M32003</guid>
      <dc:creator>Sandeep_30</dc:creator>
      <dc:date>2005-03-22T14:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509733#M32004</link>
      <description>Right. I suspected that. Unfortunately I am a little short in time just now, so I can not give a full explanation.&lt;BR /&gt;&lt;BR /&gt;Basically this is NOT the way thinks are done under VMS.&lt;BR /&gt;You are one user and you stay that use.&lt;BR /&gt;How else can you have proper security, accounting, and so on.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you are a privilled use you can SUBMIT a job under a different name, or CREATE A PROCESS (SYS$CREPRC) under a differnt user name, but that is done for exceptions, not as rule.&lt;BR /&gt;&lt;BR /&gt;The rule is to give, or deny, a user the right to use certain objects (files) or not.&lt;BR /&gt;&lt;BR /&gt;So now I would want you to drill down one level deeper. Why do you think you need to change user ID. Why can the current user not do the job and what would it take (securely) to allow the current user to do that job.&lt;BR /&gt;&lt;BR /&gt;Please be sure to start reading up on VMS security a little.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Mar 2005 15:26:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509733#M32004</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-03-22T15:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509734#M32005</link>
      <description>See&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82FINAL/5763/5763pro_005.html#long_and_posix_gid_sec" target="_blank"&gt;http://h71000.www7.hp.com/doc/82FINAL/5763/5763pro_005.html#long_and_posix_gid_sec&lt;/A&gt;&lt;BR /&gt;for information on posix style identifiers.&lt;BR /&gt;However consider carefully the advice to look at why the program changes uid.</description>
      <pubDate>Wed, 23 Mar 2005 04:25:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509734#M32005</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2005-03-23T04:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509735#M32006</link>
      <description>Sandeep,&lt;BR /&gt;&lt;BR /&gt;Welcome to VMS!!&lt;BR /&gt;&lt;BR /&gt;I am assuming you are doing this because there is some functionality (like running a program) that TEST is not allowed, but QA is allowed.&lt;BR /&gt;&lt;BR /&gt;The standard way to do this in VMS is to create IDENTIFIER (not user!) QA (and all others that you identify as separate functionalities to be allowed or disallowed).&lt;BR /&gt;&lt;BR /&gt;You protect the objects that are needed to perform the function to be ALLOWED by holders of the identifier, else disallowed.&lt;BR /&gt;&lt;BR /&gt;And in the authorisation, you (as in: the system manager) GRANT the relevant identifiers, say QA, to user SANDEEP and HEIN, but not to JAN. Now the first two can use the functionality QA.&lt;BR /&gt;You grant identifier ITRC to SANDEEP and JAN.&lt;BR /&gt;Result those two can do ITRC (whatever that does), and HEIN can not.&lt;BR /&gt;Next application: BLABLA&lt;BR /&gt;Grant BLABLA to HEIN, IAN, and JAN.&lt;BR /&gt;-&amp;gt; BLABLA is available to those 3, not to SANDEEP.&lt;BR /&gt;&lt;BR /&gt;-- if you are familiar with those principles, then there are refinements like DYNAMIC identifier, which can be swithced off and on, and SUBSYSTEM identifiers, which are intended to allow access to certain objects (mostly files) only WHILE executing an certain image that has that identifier, but NOT in any other way.&lt;BR /&gt;&lt;BR /&gt;All this together allows fine-grained, individually authorizable, secure, and auditable access control, with very little System Admin overhead.&lt;BR /&gt;&lt;BR /&gt;Example of that: we maintain an environment with 8000+ users, 20 different applications, (each with separate PROD, TEST, and TRAIN access, each with various authorisation levels), and 1200 separately granted projects. Om avarage 250 authorisation mutations per week.&lt;BR /&gt;&lt;BR /&gt;All done with identifiers, and requiring a total maintenance effort of less than one workday per week.&lt;BR /&gt;&lt;BR /&gt;And it is ALL fully auditted, and every application use of every single user is identifiably traced.&lt;BR /&gt;&lt;BR /&gt;Let me finish with repeating Hein's final advice:&lt;BR /&gt;&lt;BR /&gt;Please be sure to start reading up on VMS security a little.&lt;BR /&gt;&lt;BR /&gt;Success!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2005 05:28:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509735#M32006</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-03-23T05:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: setgid and setuid</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509736#M32007</link>
      <description>Many thanks for the reply. The advice I received has been extemely helpful.&lt;BR /&gt;&lt;BR /&gt;I have been experimenting with the persona and ACL related system calls. &lt;BR /&gt;&lt;BR /&gt;I am running into trouble after the program assumes the role of new persona.&lt;BR /&gt;&lt;BR /&gt;My account has "system", "impersonate" and "group priviledge".&lt;BR /&gt;&lt;BR /&gt;The error I am seeing is,&lt;BR /&gt;%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation&lt;BR /&gt;&lt;BR /&gt;I am including my test program, output along with the contents of the file I a trying to access. &lt;BR /&gt;&lt;BR /&gt;Appreciate your help.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Sandeep</description>
      <pubDate>Thu, 24 Mar 2005 19:18:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/setgid-and-setuid/m-p/3509736#M32007</guid>
      <dc:creator>Sandeep_30</dc:creator>
      <dc:date>2005-03-24T19:18:37Z</dc:date>
    </item>
  </channel>
</rss>

