System Error 67 — The Network Name Cannot Be Found (net use Fix)
System error 67 appears when mapping a network drive via net use. Here is the precise cause and every fix, including reliable net use syntax for scripting.
What This Error Means
When running:
net use Z: \\HOSTNAME\ShareName
You see:
System error 67 has occurred. The network name cannot be found.
Error 67 is the command-line equivalent of the GUI error 0x80070043. Windows establishes a TCP connection to the target host but cannot find a share with the specified name. The machine exists; the share doesn't — or can't be accessed.
This is distinct from error 1231 (machine not reachable) where the TCP connection itself fails.
Root Cause 1 — The Share Name Is Wrong
The most common cause by far. Share names are case-insensitive but must otherwise match exactly. A trailing space, a missing s, or a different capitalisation convention all produce error 67.
Verify the exact share names on the target machine:
Get-SmbShare | Format-Table Name, Path -AutoSize
Or remotely (if you have admin access to the remote machine):
Get-SmbShare -CimSession HOSTNAME | Format-Table Name, Path
Or browse to confirm:
net view \\HOSTNAME
This lists all shares visible on the target machine without attempting to connect to a specific one. Use this output to verify the exact share name.
Root Cause 2 — The SMB Server Service Is Not Running on the Target
Even if the machine is reachable, if the Server service (LanmanServer) is stopped, no share names are accessible.
Fix:
# Run on the target machine
Set-Service LanmanServer -StartupType Automatic
Start-Service LanmanServer
Verify remotely:
Test-NetConnection -ComputerName HOSTNAME -Port 445
If TcpTestSucceeded is True but net use still fails: the port is open but the share enumeration is failing. Check the share name.
Root Cause 3 — Firewall Blocking SMB Named Pipe
Even with the SMB port (445) open, a firewall can block the named pipe traffic used for share enumeration. This causes the machine to accept the TCP connection but fail to respond to SMB share requests.
Fix on the target machine: Control Panel → Windows Defender Firewall → Advanced Settings → Inbound Rules → enable "File and Printer Sharing (SMB-In)" for the Private profile. Also ensure "Network Discovery" rules are enabled.
Root Cause 4 — Trailing Backslash or Slash in the Path
A common scripting mistake:
net use Z: \\HOSTNAME\ShareName\ ← extra backslash causes error 67
Remove any trailing backslash from the share path.
Root Cause 5 — UNC Path Length Too Long
Windows net use has limits on UNC path length. If the share path after the hostname exceeds the path limit, you may see error 67. This is uncommon but can occur in deeply nested share structures.
Fix: Access a higher-level share and navigate down from there, or remap to a shorter-named share.
Reliable net use Syntax Reference
For scripting drive mappings reliably, use this syntax:
Basic mapping:
net use Z: \\192.168.1.45\Projects /persistent:yes
With specified credentials:
net use Z: \\192.168.1.45\Projects /user:USERNAME PASSWORD /persistent:yes
Delete existing mapping before re-mapping (avoids "already in use" errors):
net use Z: /delete /yes 2>nul
net use Z: \\192.168.1.45\Projects /user:USERNAME PASSWORD /persistent:yes
Check error code after mapping:
net use Z: \\192.168.1.45\Projects
if %errorlevel% == 67 echo Share not found — check share name
if %errorlevel% == 53 echo Machine not reachable
if %errorlevel% == 5 echo Access denied — check credentials
if %errorlevel% == 0 echo Success
Using IP address instead of hostname in scripts: Always prefer IP address over hostname in automated scripts. Hostname resolution adds a failure point that IP addresses eliminate.
Debugging Error 67 in a Script
Add verbose logging to identify exactly when and why the failure occurs:
@echo off
echo Testing connection to share...
net view \\192.168.1.45 > nul 2>&1
if %errorlevel% neq 0 (
echo Machine not reachable - error %errorlevel%
exit /b %errorlevel%
)
echo Machine reachable, attempting drive map...
net use Z: \\192.168.1.45\Projects /persistent:yes
if %errorlevel% neq 0 (
echo Drive map failed - error %errorlevel%
exit /b %errorlevel%
)
echo Drive mapped successfully.
Done with net use?
Oxolan connects to other office PCs automatically — no commands or scripting required.
Frequently Asked Questions
Error 67 in a logon script but not manually. Why?
The logon script runs before the network is fully initialised. Add a delay: ping -n 10 127.0.0.1 > nul to wait approximately 10 seconds before the net use command. Alternatively, use net use /persistent:yes so the drive reconnects at login without depending on script timing.
The net view command also shows error 67 for the same hostname. What does that mean?
net view \\HOSTNAME returning error 67 means the Server service on the target is not responding to share enumeration requests. Check that LanmanServer is running and port 445 is not blocked.
Error 67 only on some shares on the same machine, not others. Why?
The specific share that fails may have been deleted or renamed. Run Get-SmbShare on the target to see the current share list and confirm the name.
Can PowerShell New-SmbMapping do what net use does?
Yes. PowerShell's New-SmbMapping is the modern equivalent:
New-SmbMapping -LocalPath 'Z:' -RemotePath '\\192.168.1.45\Projects' -Persistent $true
It provides better error messages than net use and integrates with PowerShell error handling.
Done troubleshooting Windows?
Oxolan handles file sharing so you never have to think about this again.
Get Oxolan for Windows