Is it possible to prorgramatically disable/ write protect the USB on MAC OS X ?. Also after a certain interval can it be enabled/ write be allowed. Any links/pointers would be appreciated.
EDIT -
I have been tasked to write a portion of software which will disable the USB drives on all the machines. This is for some customers who do not want their employees to take a USB and copy company sensitive information. But then for certain admins, the USB drives should get ena开发者_StackOverflow中文版bled by the admin.
It is my understanding that the write-protect tabs/switches on normally writable media physically disable the machine from being able to write to the media, so this oughtn't to be possible in software.
If you post more details on what you're trying to achieve, we might be able to offer some other suggestions.
For example, you might mount the volume as read-only, and after the time period has elapsed your software could change that to read-write access?
This functionality is already supported by the management frameworks on OS X. The simplest way to enable the restrictions would be with a Configuration Profile.
The drive policies only work with mountable volumes, so if you want more granular USB filtering you can use the iokit integration with launchd to specify things at a USB device level. Check this answer for more details on that approach. launchd LaunchEvents keys
精彩评论