Q: launchd process to enable Remote Management
Hi Everyone,
I'm an IT assistant at a school and we used Remote Desktop to monitor and deploy packages etc to our Students and Teachers.
All the students have Admin rights as they are allowed to take them home and install applications.
The trouble we have is the students like to uncheck the "Remote Management" option, which interrupts our monitoring and reporting.
I've been doing some looking around and it seems to suggest to create a LaunchDaemon that will run a script at an interval to reenable Remote Management.'
I have the files quoted below. I can manually load the launchd but when I restart it won't load automatically and it doesn't seem to run the script as Remote Management is not ever enabled again.
Can someone please help, I'd really appreciate it.
This is the plist file, saved in /Library/LaunchDaemons/com.companyname.enableARD.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.companyname.enableARD</string>
<key>ProgramArguments</key>
<array>
<string>/private/var/companyname/enableARD.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>60</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
And this is the .sh referenced in the plist file. The .sh file ownership has been set to root and chmod 4755
#!/bin/bash
su /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -activate -configure -users mmcadmin -access -on -restart -agent -privs -all
Thanks
Posted on Sep 9, 2015 4:22 AM
launchd plists need to be 0644 or they will be ignored.
-rw-r--r-- root wheel
Posted on Sep 9, 2015 8:05 AM