Wednesday, February 20, 2013

Getting an "Access is denied." error when connecting to a share


Are you encountering a situation where you're getting an "Access is denied" error when connecting to a share on a machines in a workgroup.  For example, if you used following command:
net use * \\computername\d$ /user:computername\username password

Then you get the following error: 
System error 5 has occurred.
Access is denied.

Try running the following command (requires the administrator command prompt): 
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1

To manually implement the change:
Warning: by modifying the registry you run the risk of damaging your operating system, only proceed if you know what you're doing.  The reader takes all responsibility for ANY damage or problems that may occur by following these instructions.
  • Start the Registry Editor (REGEDIT.EXE).
    • If you get the UAC prompt, acknowledge it.
  • Locate and then click the following registry sub-key:
    • HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ System
  • in the Edit menu, select New and then select DWORD (32-bit) value.
  • In name field type LocalAccountTokenFilterPolicy, and then press the Enter key.
  • Right-click the LocalAccountTokenFilterPolicy, and then press the Modify button.
  • In the Value data box, type 1, and then press the OK button.
  • Quit the registry editor. 

No comments: