PRB: RAW Socket Access Denied to Non-Admin Windows NT 4.0 Users

ID: Q195445

The information in this article applies to:

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SYMPTOMS

A Socket or WSASocket call that specifies the SOCK_RAW socket type fails with Winsock error 10013 WSAEACCES if the user is a non-administrator logged onto a Windows NT 4.0 system.

CAUSE

This is by design.

RESOLUTION

To work around this problem in Windows NT 4.0, you can disable the security check on RAW sockets by creating the following registry variable and setting its value to DWORD 1:

   HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Afd\Parameters\ 
   DisableRawSecurity

After you change the registry, you need to restart your computer.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

Additional query words: SOCK_RAW

Keywords          : kbnetwork kbSDKPlatform kbWinsock kbNTOS400sp4 kbGrpNet 
Issue type        : kbprb

Last Reviewed: January 7, 1999