This may not be the correct place for this question, and if so I apologize.
I've been handed a project of surveying all the files on many Linux servers to see which users across the entire cluster are using the most files, and to sort users by latest file modified. The person who gave me this project wants me to do it in bash by fiddling with the string outputs of many commands. I could do it much easier in PowerShell, except for these problems: the servers are too old to run PowerShell for Linux, and when I run it on Windows through Samba shares, Get-Acl can't resolve the returned SIDs to user names. If I could just figure out how to resolve a SID to a Linux owner name, I'd be all set, and I'd be able to sort and sum any file properties I wanted as objects.
For example, I could run this:
Get-Item -Path \\server\share\testfile | Get-Acl | Select owner
I'd get a result of a string SID, like so:
O:S-1-5-21-3211650329-300098617-3820912319-1070
Even though the user name and user ID are the same on every node of the cluster, I get a different SID returned from each node.
But if I look at the file in Windows Explorer and look at its security tab, Windows is able to resolve the owner to server\username. So that information is SOMEWHERE.
Is there anything I can do in PowerShell that will let me access this mapping?