"Simple" script help - Give user read only access to other users folders

New Contributor III

Hello, fairly new to scripting and don't want to mess this up. Hoping the wonderful support network here may be willing to help out.

We often have teachers requesting to access files in a students user folder on a mac where a student is on vacation, suspended, or otherwise unavailable, but has classwork that needs to be accessed but was not turned-in. I'm hoping someone may be able to help write a script that can accomplish the following:

Give logged in user read-only access to all other users on this mac, so somehow including the username variable?

This would be scoped so that an employee would log into a computer lab mac, open self service and run this policy tied to a script. The policy would obviously only be scoped to specific users, and only on specific machines.

Thanks in advanced!,