Microsoft KB Archive/195445

{|
 * width="100%"|

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

 * }

Q195445

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), used with:
 * the operating system: Microsoft Windows NT 4.0 SP4
 * the operating system: Microsoft Windows 2000

-

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 or Windows 2000 system.

CAUSE
This is by design.

RESOLUTION
In Windows 2000, there is no way to disable this security check. Access to Raw Sockets is granted on a per-transport basis. For the address family AF_INET, only administrators have the access necessary to create Raw Sockets.

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 AF_INET

Keywords : kbnetwork kbOSWin2000 kbSDKPlatform kbWinsock kbOSWinNT400sp4 kbGrpDSNet

Issue type : kbprb

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch