Scheduled task
-------
#!/bin/bash
shortname=stat -f '%u %Su' /dev/console | awk '{print $2}'
rm /Users/"$shortname"/Library/Preferences/extensis.plist
----
Unless I'm missing something?
Or loop through all home folders, something along the lines of:
cd /Users
for account in *
do
rm /Users/$account/Library/Preferences/extensis.plist
done
Schedule it with a launchd item...

You say 'all' users.
If the users all are in /Users, then there is no reason you shouldn't be able to do
rm /Users/*/Library/Preferences/extensis.plist
However, this isn't the tidiest, since Shared wont have a file of this, but it wont stop the script running.
To be neater, you could run
ls -1 | grep -v Shared | while read line
and run the rm command for that file.
ls -1 | grep -v Shared | while read line
do
rm /Users/"$line"/Library/Preferences/extensis.plist
done
For a more elegant solution, you would actually check to see if the file existed before removing!
It'll be something like:
ls -1 | grep -v Shared | while read line
do
if [ -f /Users/"$line"/Library/Preferences/extensis.plist ]
then
rm /Users/"$line"/Library/Preferences/extensis.plist
fi
done
Haven't tested this, but it should work!
If your users are network users, then clearly this is going to need handled differently.
You can then either use a policy to trigger this or write your own launchd item to run the script. For launchd, google StartInterval and StartCalendarInterval

+elenty billion for scheduled task via launchd
my method
#!/bin/bash
userList=$(dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }')
for u in ${userList} ; do
rm /Users/${u}/Library/Preferences/extensis.plist
done
exit 0
This will loop through all users with UID greater than 500
-Tom
