If you do not have Group Policy Preferences installed see Install Group Policy Preferences. This link tells you how to do it in a 2003 domain. In a 2008 domain it is much easer as all you have to do is enable the feature. See "The Steps" section below if you need a step by step.
Our objective is to prevent users from being able to take data away with them by plugging in a USB drive or memory stick. Due to the way that windows works and specifically order of precedence on when things run we have to "lock down" two different components.
Group Policy Preference: Change Registry Value: HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR\Start (4=Disable USB Drives; 3=Enable USB Drives). This setting will change the registry USB Drive Start Value to 4 which is disabled. Thus, the USB Drive is not allowed to be installed. There is a limitation of this policy. That is, it only does it's job if the driver is already installed. If the driver is installed after the policy is executed, windows automatically changes the value back to 3 upon driver installation. Therefore, when using this setting, you must also pair it with the setting to disable the installation of the driver USBSTOR.
How to do this: From your Vista machine with Group Policy Preferences installed or from a Windows Server 2008 machine with Group Policy Management Tools Installed. Start\Control Panel\Administrative Tools\Group Policy Management Tools. Open a group policy that you want to add these setting to (or create a new one). Edit the policy and expand User Configuration\Preferences\Windows Settings. Right-Click on Registry select New from the drop down menu then select Registry Item. In Fill out the form as indicated in the screen shot of Group Policy Preference A Main . The items you need to select are as follow:
Changes Registry Value: SYSTEM\CurrentControlSet\Services\USBSTOR\Start (4=Disable USB Drives; 3=Enable USB Drives)
This setting will change the registry USB Drive Start Value to 4 which is disabled. Thus, the USB Drive is not allowed to be installed. There is a limitation of this policy. That is, it only does it's job if the driver is already installed. If the driver is installed after the policy is executed, windows automatically changes the value back to 3 upon driver installation. Therefore, when using this setting, you must also pair it with the setting to disable the installation of the driver USBSTOR.INF. This can be done via group policy "Computer Configuration\Policies\Windows Settings\Security Settings\File System" and denying access to users that should not have access to drives.
See http://blogs.technet.com/danstolts/archive/2009/01/21/disable-adding-usb-drive-and-memory-sticks-via-group-policy-and-group-policy-preferences.aspx for details
Click the links for screen shots:
I strongly recommend you click on the Common tab and copy and paste the description above into the description field
This can be done via group policy "Computer Configuration\Policies\Windows Settings\Security Settings\File System" and denying access to users that should not have access to drives. At this location add the files "%SystemRoot%\inf\usbstore.inf" and ""%SystemRoot%\inf\usbstore.pnf" and set permissions so users that you do not want to be able to install drives, cannot read the files. You can do this this second piece in one of two ways. You can deny access by adding the group and selecting deny or you can simply not allow access by removing the users from the security list. Keep in mind that when you apply this policy it will OVERWRITE the permissions on these files for all machines where the policy is applied. For this reason, you will no longer have "local" access to the files when you login using a non-domain account. Usually when you want to turn this setting on this is an acceptable side effect because you do not want to give users any method of getting there including logging in as a non-domain user. Click link for screen shot of Group Policy Preference B
I have been thinking about created a step by step video of this process. If that would be beneficial to you, let me know and I will try to make it happen. In a nutshell the process is as follows:
By using this method of applying the policy, a non-deny user can login to the machine and run the "Net Start USBStor" from the command line and then insert the USB drive and it will work. Be advised though that the Computer part of the policy applies prior to login so you will have to login with the correct credentials of a user that has access and then reboot the computer (or do "gpupdate /force" from the command line). However, when you are done, remember that the computer setting is done before you login so the next time a deny user logs in they may have access to these features until they reboot the computer and the policy is "re-applied" with their credentials. To avoid this situation, I recommend you try to avoid using USB drives from a machine where the typical user does not have access to USB. This way you will not "accidentally" give them temp access to the feature. If you must use a USB drive on this system just remember to login as a deny user and then "reboot" the workstation to confirm that the security profiles are correct.
If you need to remove the Group Policy, remember the security rights of the files that you changed the security of will NOT change back to the original. Therefor, you will want to change the policy to remove the deny user group and make sure the policy gets applied to all workstations before removing it. Even if you do this, the "local Users" will not necessarily have rights unless you specifically go back to the machine and give them rights.
A Knowledge Base article was posted with the manual steps to disable adding usb drives to a machine. However, I wanted to share a way to "automate" this process using Group Policy and Group Policy Preferences. There are more ways to accomplish this task but this one is easy to implement and will teach you about some features in Group Policy and in Group Policy Preferences that are not often used. If you want to see the manual process for disabling access or install of USB drives (memory sticks, etc) check out KB article 823732 from http://support.microsoft.com/kb/823732
So that you have the text from the GP that I created in preparing this content, I have put a copy of the report of the resulting GPO below
PingBack from http://blogs.technet.com/danstolts/archive/2009/01/21/installing-and-managing-group-policy-preferences-on-a-windows-server-2003-domain.aspx
Very good & informative. I hv some query if u can solve.
We had implemented the GPO in which "Regedit" couldnot run setting was done for each of the PC in the Win2k8 domain. Now I want to know how to get it enabled. Please advise or email me the links on
Went through your comprehensive document but unfortunately was unable to toggle between enable /disable as net start usbstor errored for allow user. My workaround was to create 2 Registry Items within User Configuration\Preferences\Windows Settings\Registry The first with a value of 4 targetting the Deny group I created. The second with a value of 3 targetting the Allow group I created. Each of these groups populated the Computer Configuration\Windows Settings\Security Settings\File System\Object name with explicit deny for the Deny Group and explicit allow for the Allow Group.
I shall be expanded the area of control to a small test group to see if their are any further issues. Thanks for the initial advice.
will this block printers and usb mouses=?
In my environment I had to deny access to usbstore.inf and usbstore.pnf files to the system account as well, otherwise new drives would be installed and accessible the first time
Very good information.
but i have one query, through this exersice you can block only pendrive right ???
but when i plug USB hard disk is working fine, it is opeing properly.
i also update the policy as well as, i also restart the system but still i got the same result.
so kinldy tell me is there any other strp to block CD rom, USB HARD DISK, Pen Drive & etc.
Thanks & Regards,
kindly give me the replay on my above mail address.
I'm stuck at adding "User in Group" after select the targeting editor screen click New Item then Select Security Group.
We have user in groups but is not able to select.
Much appreciated can email me a feedback at firstname.lastname@example.org
Outstanding info! Keep those ports secured! Of course, be careful not to "disallow" USB printers and other stuff that may be needed.