Discussion:
Finding OMVS Files with Owner IDs for Deleted Owners?
Add Reply
Dyck, Lionel B. , TRA
2017-12-01 15:31:27 UTC
Reply
Permalink
Raw Message
Is there a tool that can find and report out all files that are owned by users who have departed?

Just ran into a few that were owned by someone who left several years ago.

Thank you

--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Styles, Andy , ITS zPlatform Services
2017-12-01 15:47:25 UTC
Reply
Permalink
Raw Message
Classification: Public
Assuming their id has been deleted:

find . -nouser

-rw-r--r-- 1 5 XXXXXXXX 10 Jul 17 09:09 test.txt

Where '5' is the id of the deleted user (actually just me issuing chown 5 test.txt - but users without ids show up as numerics in ls).

01/12/17 15:45:50 /u/xxxxxxx $ find . -nouser
./test.txt

There's a -nogroup equivalent too.

Andy Styles
z/Series Systems Programmer

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Dyck, Lionel B. (TRA)
Sent: 01 December 2017 15:33
To: IBM-***@LISTSERV.UA.EDU
Subject: Finding OMVS Files with Owner IDs for Deleted Owners?

-- This email has reached the Bank via an external source --


Is there a tool that can find and report out all files that are owned by users who have departed?

Just ran into a few that were owned by someone who left several years ago.

Thank you

--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN



Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555.

Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500.

Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 03457 801 801.

Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority.

Halifax is a division of Bank of Scotland plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Dyck, Lionel B. , TRA
2017-12-01 15:49:59 UTC
Reply
Permalink
Raw Message
Thank you - that is just what I need.

--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Styles, Andy (ITS zPlatform Services)
Sent: Friday, December 01, 2017 9:49 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Finding OMVS Files with Owner IDs for Deleted Owners?

Classification: Public
Assuming their id has been deleted:

find . -nouser

-rw-r--r-- 1 5 XXXXXXXX 10 Jul 17 09:09 test.txt

Where '5' is the id of the deleted user (actually just me issuing chown 5 test.txt - but users without ids show up as numerics in ls).

01/12/17 15:45:50 /u/xxxxxxx $ find . -nouser
./test.txt

There's a -nogroup equivalent too.

Andy Styles
z/Series Systems Programmer

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Dyck, Lionel B. (TRA)
Sent: 01 December 2017 15:33
To: IBM-***@LISTSERV.UA.EDU
Subject: Finding OMVS Files with Owner IDs for Deleted Owners?

-- This email has reached the Bank via an external source --


Is there a tool that can find and report out all files that are owned by users who have departed?

Just ran into a few that were owned by someone who left several years ago.

Thank you

--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN



Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555.

Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500.

Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 03457 801 801.

Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority.

Halifax is a division of Bank of Scotland plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
John McKown
2017-12-01 15:48:10 UTC
Reply
Permalink
Raw Message
Post by Dyck, Lionel B. , TRA
Is there a tool that can find and report out all files that are owned by
users who have departed?
Just ran into a few that were owned by someone who left several years ago.
​The UNIX "find" command can do that for you. But it can take a long while
to run, depending on where you start from. E.g. if you start the scan at
the root directory, it will traverse every directory in every mounted
filesystem (in general). This will take a while. In z/OS BATCH, you can try:

//SCANIT EXEC PGM=BPXBATCH,REGION=0M,
// PARM='SH find / -nouser'
//STDIN DD PATH='/dev/null'
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//

​Basically the "-nouser" switch does exactly what you want. For each file
it finds (all in the above case), it will only display those whose "owner"
UID does not have an associated RACF ID.​
Post by Dyck, Lionel B. , TRA
Thank you
--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Robert S. Hansel , RSH
2017-12-03 20:09:50 UTC
Reply
Permalink
Raw Message
Hi Lionel, (cross-posted IBM-MAIN and MVS-OE)

Here are a couple of things to keep in mind.

1) I've found it necessary to specify the path as /* with the find command.

2) Check the extended ACLs too if there are any.
find path -acl_nouser
find path -acl_nogroup

3) As an alternative to the find command, consider using IBM's IRRHFSU utility for this task. Our presentation on this utility, which includes a sample ICETOOL job for this very task, is available on our website.

http://www.rshconsulting.com/racfres.htm

4) If there is a USERID assigned an Owner or ACL UID, but the USERID's Default Group does not have a GID, find will consider the UID as being unassigned. Same with the ls command and IRRHFSU. Verify a UID is truly unassigned before changing it.

2) If this is a RACF installation, to avoid an SMF tsunami do not execute find or IRRHFSU for the entire file system with a USERID having the UAUDIT attribute.

Regards, Bob

Robert S. Hansel
Lead RACF Specialist
RSH Consulting, Inc. *** Celebrating our 25th Year ***
617-969-8211
www.linkedin.com/in/roberthansel
http://twitter.com/RSH_RACF
www.rshconsulting.com
----------------------------------------------------------------------------
Upcoming RSH RACF Training - WebEx
- RACF Audit & Compliance Roadmap - FEB 5-9, 2018
- RACF Level I Administration - DEC 5-8, 2017
- RACF Level II Administration - NOV 13-17, 2017
- RACF Level III Admin, Audit, & Compliance - OCT 2-6, 2017
- RACF - Securing z/OS UNIX - OCT 23-27, 2017
----------------------------------------------------------------------------




-----Original Message-----
Date: Fri, 1 Dec 2017 15:51:02 +0000
From: "Dyck, Lionel B. (TRA)" <***@VA.GOV>
Subject: Re: Finding OMVS Files with Owner IDs for Deleted Owners?

Thank you - that is just what I need.

--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Styles, Andy (ITS zPlatform Services)
Sent: Friday, December 01, 2017 9:49 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Finding OMVS Files with Owner IDs for Deleted Owners?

Classification: Public
Assuming their id has been deleted:

find . -nouser

-rw-r--r-- 1 5 XXXXXXXX 10 Jul 17 09:09 test.txt

Where '5' is the id of the deleted user (actually just me issuing chown 5 test.txt - but users without ids show up as numerics in ls).

01/12/17 15:45:50 /u/xxxxxxx $ find . -nouser
./test.txt

There's a -nogroup equivalent too.

Andy Styles
z/Series Systems Programmer

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Dyck, Lionel B. (TRA)
Sent: 01 December 2017 15:33
To: IBM-***@LISTSERV.UA.EDU
Subject: Finding OMVS Files with Owner IDs for Deleted Owners?

-- This email has reached the Bank via an external source --


Is there a tool that can find and report out all files that are owned by users who have departed?

Just ran into a few that were owned by someone who left several years ago.

Thank you

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Dyck, Lionel B. , TRA
2017-12-03 20:17:22 UTC
Reply
Permalink
Raw Message
Outstanding - thank you


--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Robert S. Hansel (RSH)
Sent: Sunday, December 03, 2017 2:11 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Finding OMVS Files with Owner IDs for Deleted Owners?

Hi Lionel, (cross-posted IBM-MAIN and MVS-OE)

Here are a couple of things to keep in mind.

1) I've found it necessary to specify the path as /* with the find command.

2) Check the extended ACLs too if there are any.
find path -acl_nouser
find path -acl_nogroup

3) As an alternative to the find command, consider using IBM's IRRHFSU utility for this task. Our presentation on this utility, which includes a sample ICETOOL job for this very task, is available on our website.

http://www.rshconsulting.com/racfres.htm

4) If there is a USERID assigned an Owner or ACL UID, but the USERID's Default Group does not have a GID, find will consider the UID as being unassigned. Same with the ls command and IRRHFSU. Verify a UID is truly unassigned before changing it.

2) If this is a RACF installation, to avoid an SMF tsunami do not execute find or IRRHFSU for the entire file system with a USERID having the UAUDIT attribute.

Regards, Bob

Robert S. Hansel
Lead RACF Specialist
RSH Consulting, Inc. *** Celebrating our 25th Year ***
617-969-8211
www.linkedin.com/in/roberthansel
http://twitter.com/RSH_RACF
www.rshconsulting.com
----------------------------------------------------------------------------
Upcoming RSH RACF Training - WebEx
- RACF Audit & Compliance Roadmap - FEB 5-9, 2018
- RACF Level I Administration - DEC 5-8, 2017
- RACF Level II Administration - NOV 13-17, 2017
- RACF Level III Admin, Audit, & Compliance - OCT 2-6, 2017
- RACF - Securing z/OS UNIX - OCT 23-27, 2017
----------------------------------------------------------------------------




-----Original Message-----
Date: Fri, 1 Dec 2017 15:51:02 +0000
From: "Dyck, Lionel B. (TRA)" <***@VA.GOV>
Subject: Re: Finding OMVS Files with Owner IDs for Deleted Owners?

Thank you - that is just what I need.

--------------------------------------------------------------------------
Lionel B. Dyck <sdg><
Mainframe Systems Programmer - TRA

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Styles, Andy (ITS zPlatform Services)
Sent: Friday, December 01, 2017 9:49 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Finding OMVS Files with Owner IDs for Deleted Owners?

Classification: Public
Assuming their id has been deleted:

find . -nouser

-rw-r--r-- 1 5 XXXXXXXX 10 Jul 17 09:09 test.txt

Where '5' is the id of the deleted user (actually just me issuing chown 5 test.txt - but users without ids show up as numerics in ls).

01/12/17 15:45:50 /u/xxxxxxx $ find . -nouser
./test.txt

There's a -nogroup equivalent too.

Andy Styles
z/Series Systems Programmer

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Dyck, Lionel B. (TRA)
Sent: 01 December 2017 15:33
To: IBM-***@LISTSERV.UA.EDU
Subject: Finding OMVS Files with Owner IDs for Deleted Owners?

-- This email has reached the Bank via an external source --


Is there a tool that can find and report out all files that are owned by users who have departed?

Just ran into a few that were owned by someone who left several years ago.

Thank you

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2017-12-03 22:50:12 UTC
Reply
Permalink
Raw Message
Post by Robert S. Hansel , RSH
1) I've found it necessary to specify the path as /* with the find command.
That follows symlinks in /, but omits dotted files there. (Does z/OS have any such?)

On most UNIXen "find ... -follow" will not follow cyclic symlink chains. Not so z/OS,
which mindlessly loops.

(On most UNIXen "find" supports the "-iname", "-ls", and "-print0" options.)

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...