Removing Accidental User Delays in policy execution.

NickKoval
Contributor
Contributor

The ability of a user to delay a policy is a great thing, but it's possible that they may accidentally select something too far out (like 1 year). If that happens, the user's choice is written the following file: /Library/Application Support/JAMF/.userdelay.plist as a key value pair. The policy number is the key and the value is the date that the policy is delayed until.

Here's a simple script that will remove the file and all the delays.

#!/bin/sh

# Remove the deferal set for all policies
rm -rf /Library/Application Support/JAMF/.userdelay.plist

If you would prefer not to use a script, create a policy that searches for this file and deletes it if found.

It's important to note that the file will regenerate as a blank plist file. You shouldn't make the policy execute continuously as you will then be fighting the default behavior (creating the plist file) with your behavior (removing the plist file) in a continuous loop.

2 REPLIES 2

elsmith
Contributor

We've been fighting with this script since yesterday - it works if I simply run the script from the machine. . . but if I push it through Casper 9.24 on our test environment, I can watch it delete and recreate the file with the deferral information still included.

Also, running it from Casper (searching and deleting) puts the file right back (again with the same information inside).

Just wanted to let you know our experience with it. . .hopefully it will help someone else avoid frustration. It seems running the script manually is the only way to truly delete this, at least in our experience.

daniel_ross
Contributor III

@nkoval I know this is a crazy old post but you helped myself and my team out with a question that we didn't think was possible. Just wanted to give you kudos to this solution!