REXX CODE TO CHANGE USERID



IBM's Command List programming language & Restructured Extended Executor

REXX CODE TO CHANGE USERID

Postby NOONE » Tue Nov 27, 2018 2:23 pm

Hi all,
i want to know if there any way to change the user id from A to B within rexx code ?



Purpose(For EX):
I did write a rexx code to do some changes on pds and i want to create file in my library to act as a log every time someone run my rexx code it will save in that file (date,userid,time) but the problem the users does not have the authority to write in file located in my library.

Thank you for your time :)
NOONE
 
Posts: 2
Joined: Wed Oct 10, 2018 7:35 pm
Has thanked: 2 times
Been thanked: 0 time

Re: REXX CODE TO CHANGE USERID

Postby expat » Tue Nov 27, 2018 2:33 pm

Then obviously you cannot do what you want to do;

If you set up an area where they can write to, then they can edit the dataset and remove themselves from the log.

You could build a specific RACF ( or whatever ) profile with write access - if your security people allow this - for a dataset to be used as the log - but see above

These users thanked the author expat for the post:
NOONE (Tue Nov 27, 2018 4:42 pm)
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: REXX CODE TO CHANGE USERID

Postby enrico-sorichetti » Tue Nov 27, 2018 2:38 pm

I did write a rexx code to do some changes on pds and i want to create file in my library to act as a log every time someone run my rexx code it will save in that file (date,userid,time) but the problem the users does not have the authority to write in file located in my library.


tracking other people work without the proper authorizations can be cause for lawful termination
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: REXX CODE TO CHANGE USERID

Postby NOONE » Tue Nov 27, 2018 4:02 pm

tracking other people work without the proper authorizations can be cause for lawful termination



It should be done because if someone run the code on a critical data it will change it so we should know who did it.That's it i'm not trying to track anyone for personal reasons.

Thank you for your time :)
NOONE
 
Posts: 2
Joined: Wed Oct 10, 2018 7:35 pm
Has thanked: 2 times
Been thanked: 0 time

Re: REXX CODE TO CHANGE USERID

Postby expat » Tue Nov 27, 2018 4:52 pm

SMF records would record all open for output operations - type 15

Although opened for output does not guarantee that output occurred
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: REXX CODE TO CHANGE USERID

Postby enrico-sorichetti » Tue Nov 27, 2018 5:11 pm

then things should not be done in "my library"

if data requires quality checking and auditing it should not be stored in a PDS
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: REXX CODE TO CHANGE USERID

Postby Pedro » Fri Nov 30, 2018 10:43 am

1. re: 'someone run the code on a critical data it will change it so we should know who did it"
The critical data should be protected from unauthorized updates.

2. REXX allows you to easily do stuff that you can already do manually. Or someone can copy your rexx program and skip the logging section. Or change the user id from A to Z (so as to blame someone else).

3. I have vague memory that you have auditing settings in the RACF profile. For the critical resource, use the highest setting. (as I said... vague memory)

4. Updates should be done from a load module. I think you can protect its execution better than you can a rexx program.
Pedro Vera

These users thanked the author Pedro for the post:
NOONE (Sun Dec 02, 2018 1:14 pm)
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: REXX CODE TO CHANGE USERID

Postby Blackthorn » Fri Dec 07, 2018 6:48 pm

You can indeed set audit setting on the RACF profile, with different levels for success or failure. So, something like -

altdsd 'dataset profile' audit(success(UPDATE),failures(READ))
Blackthorn
 
Posts: 130
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 1 time
Been thanked: 9 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post