My question is very simple, is it possible to search for files in my clients' recycle bin? With EA or politics?
Sure, the Trash is just a hidden folder in your users home folder. Just follow the path /Users/<user_shortname>/.Trash to get to the files trashed by the user.
Sure, the Trash is just a hidden folder in your users home folder. Just follow the path /Users/<user_shortname>/.Trash to get to the files trashed by the user.
I wouldn't do it via an EA - but rather a targeted policy that runs a simple script - this should output everything in the trash. for you to test it I had to give terminal full disk access, so test it first. and then see what it returns in the logs of the policy when run from jamf.
#get logged in user
LastLoggedInUser=$(defaults read /Library/Preferences/com.apple.loginwindow lastUserName)
#list all trash items
ls -al /Users/$LastLoggedInUser/.Trash
Actually with some scripting you could create a script that runs under a policy that will dump a listing of all the contents of the Trash folder and uploaded via API as an attachment to computer inventory in Jamf Pro.
You could install a launchdaemon that will watch the .trash folder for changes so every time a new file is added, it will trigger a script that logs the file information to a .log file. Then a policy will collect that .log file daily, zip it and upload it via API to the computer inventory in Jamf Pro.
Actually with some scripting you could create a script that runs under a policy that will dump a listing of all the contents of the Trash folder and uploaded via API as an attachment to computer inventory in Jamf Pro.
You could install a launchdaemon that will watch the .trash folder for changes so every time a new file is added, it will trigger a script that logs the file information to a .log file. Then a policy will collect that .log file daily, zip it and upload it via API to the computer inventory in Jamf Pro.
Good call @falabella_cst - I would recommend what you outlined here vs just adding the results to the inventory record(like an EA does) as it spits it out, it would be a lot less overhead on the server. I'm curious as to the use case behind this as it seems like it would be tons of info.... 🤔 🤔
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.