- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: setgid and setuid
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2005 04:42 AM
03-22-2005 04:42 AM
Can you please take a look and let me know what I am doing wrong ? Is their a better way to do the same ?
I have attached my test program along with this attachement.
Below is the output of the program.
Thanks
Sandeep
$ changeid :== $SYS$SYSDEVICE:[MYTEST.MYJOBS]changeid.exe
$ set process /priv= all
$ changeid qa
Original Value : uid = [8388754] and gid = [128]
*** qa information ***
pw uid : 8388755
pw name : qa
pw dir : SYS$SYSDEVICE:[QA]
pw gid : 128
*** start Method1 : changeIdentity() ***
start : Inside changeIdentity. uid = [8388755] and gid = [128]
New Value : uid = [8388754] and gid = [128]
end : Inside changeIdentity.
*** End Method1 : changeIdentity() ***
*** start Method2 : changeIdentity1() ***
start : Inside changeIdentity1. uid = [8388755] and gid = [128]
New Value : uid = [8388754] and gid = [128]
end : Inside changeIdentity1.
*** End Method2 : changeIdentity1() ***
parent done.
PS : I am using HP OpenVMS Industry Standard 64 Operating System, Version V8.2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2005 05:05 AM
03-22-2005 05:05 AM
Re: setgid and setuid
Hmmm, are you in a context with POSIX IDs enabled?
With POSIX IDs disabled, setuid and setgid serve no function and just return succes for portability purpose.
Does it work for you on an other VMS version?
What problem are you trying to solve?
VMS has many advanced sercurity features like 'identifiers' which may be better suited to solve the 'real problem', perhpas access to an object.
hope this helps a little,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2005 06:54 AM
03-22-2005 06:54 AM
Re: setgid and setuid
Thanks for the reply.
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.
The only OpenVMS machine I have is I64 - v8.2
Below is a brief description of what I am trying to do -
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.
eg :
As original user (TEST) if the .com file has a command "sh proc". The run results should be
22-MAR-2005 13:49:37.97 User: TEST Process ID: 0000BD8B
Node: OVMS01 Process name: "_TNA77:"
....
....
If I change the user (lets say QA) and if the .com file has a command "sh proc". The run should results in
22-MAR-2005 13:49:37.97 User: QA Process ID: 0000B231
Node: OVMS01 Process name: "_TNA78:"
....
....
Is their a way to accomplish this ? Does this explaination help ?
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2005 07:26 AM
03-22-2005 07:26 AM
Re: setgid and setuid
Basically this is NOT the way thinks are done under VMS.
You are one user and you stay that use.
How else can you have proper security, accounting, and so on.
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.
The rule is to give, or deny, a user the right to use certain objects (files) or not.
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.
Please be sure to start reading up on VMS security a little.
Regards,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2005 08:25 PM
03-22-2005 08:25 PM
Re: setgid and setuid
http://h71000.www7.hp.com/doc/82FINAL/5763/5763pro_005.html#long_and_posix_gid_sec
for information on posix style identifiers.
However consider carefully the advice to look at why the program changes uid.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2005 09:28 PM
03-22-2005 09:28 PM
SolutionWelcome to VMS!!
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.
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).
You protect the objects that are needed to perform the function to be ALLOWED by holders of the identifier, else disallowed.
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.
You grant identifier ITRC to SANDEEP and JAN.
Result those two can do ITRC (whatever that does), and HEIN can not.
Next application: BLABLA
Grant BLABLA to HEIN, IAN, and JAN.
-> BLABLA is available to those 3, not to SANDEEP.
-- 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.
All this together allows fine-grained, individually authorizable, secure, and auditable access control, with very little System Admin overhead.
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.
All done with identifiers, and requiring a total maintenance effort of less than one workday per week.
And it is ALL fully auditted, and every application use of every single user is identifiably traced.
Let me finish with repeating Hein's final advice:
Please be sure to start reading up on VMS security a little.
Success!
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2005 11:18 AM
03-24-2005 11:18 AM
Re: setgid and setuid
I have been experimenting with the persona and ACL related system calls.
I am running into trouble after the program assumes the role of new persona.
My account has "system", "impersonate" and "group priviledge".
The error I am seeing is,
%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation
I am including my test program, output along with the contents of the file I a trying to access.
Appreciate your help.
Thanks
Sandeep