Hi there,
I'm struggling. We are a vocational school (~1000 devices) and some of our students don't shutdown their Macs correctly (every day). They are still logged in or just did a logout but didn't shut down the machine.
So I decided to script against that problem to save energy. My solution is:
- a script is invoked by an LaunchAgent every 5 Minutes
- the script checks the iMacs idle status
- if it is more than 20 min a jamfhelper dialog is shown to inform the user (with a timer to react)
- if the dialog it not canceled it (should) shutdown the Mac
I decided to use an LaunchAgent, because the dialog should also be shown if nobody is logged in (loginwindow).
The problem is: shutdown has to be invoked with root privileges and LaunchAgents runs in user-context.
Does anybody have an idea to get around this without giving all students root privileges (they aren't in the soduers file)

