Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make sure that the default admin$ share is enable on ServerName

When running the psexec command to remotely install or execute something on a sever on the same network the following error was displayed.

Couldn't access ServerName

The network name cannot be found

Make sure that the default admin$ share is enable on ServerName

Most references suggested that you add the following to the registry, but in my case this was already added to the server. This did not resolve the issue.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System and create or modify a REG_DWORD value LocalAccountTokenFilterPolicy and set its value to 1

like image 427
Geddon Avatar asked Aug 22 '13 18:08

Geddon


People also ask

What is default admin$ share?

Answer. Admin$ shares or administrative shares are hidden network shares created by the Windows NT family of operating systems. They give system administrators remote access to every disk volume on a network-connected system.

How do I check my admin$ share?

Click Start, click Run, type cmd, and then press ENTER. At the command prompt, type net share, and then press ENTER. Look for the Admin$, C$, and IPC$ administrative shares in the list of shares.


1 Answers

Solution:

You need to add the 'admin$' share which is your C:\Windows location.

  1. Go to C:\windows and right-click --> Properties
  2. Hit advance sharing
  3. Click the check box Share this folder
  4. Enter the name admin$ and hit Permissions
  5. I would recommend removing 'Everyone' and adding just the users that the PsExec command will use to execute.

Run the PsExec command again and this should resolve your issue.

Edit:

You can also turn on your AutoShareServer in the registry, which will automatically create the admin shares.

  1. Start regisry regedit
  2. Search for key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer
  3. Change the AutoShareServer key to 1
like image 60
Geddon Avatar answered Sep 20 '22 08:09

Geddon