Software⏱️ 3 min read📅 2026-06-11

How to Fix: What is going on when I can't access an SMB server share (not accessible error) until I run cmdkey to delete the credential?

Windows SMB/CIFS connection issue with stored credentials and non-domain shares.

Quick Answer: Check the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\SMB\Server for the 'AutoLogon' setting, which might be causing the issue.

The 'Not Accessible' error when connecting to an SMB server share, requiring the use of cmdkey to delete stored credentials, affects Windows 7 users who have enabled 'Remember Credentials' on non-domain shares. This issue can be frustrating for users who rely on automatic login capabilities.

This problem is particularly vexing because it only occurs after a reboot, and the first connection works fine until the next time the PC restarts.

💡 Why You Are Getting This Error

  • The primary reason for this error lies in Windows 7's handling of SMB/CIFS stored credentials. When 'Remember Credentials' is enabled on non-domain shares, Windows stores these credentials locally, which can lead to invalidation after a reboot. This is because Windows uses the Credential Manager to store and manage credentials, but it does not properly handle the deletion of credentials when they are no longer needed.
  • Another possible cause could be related to Group Policy settings or registry configurations that affect SMB/CIFS connections. However, this would require more extensive troubleshooting and investigation.

🛠️ Step-by-Step Verified Fixes

Using cmdkey to delete stored credentials

  1. Step 1: To resolve the issue, open the Command Prompt as an administrator and run the following command: cmdkey /delete:Domain:target=HOSTNAME. Replace 'Domain' with your actual domain name or leave it blank if you're connecting to a non-domain share.
  2. Step 2: This will delete the stored credentials for the specified host, allowing you to reconnect to the shared folder without encountering the 'Not Accessible' error.
  3. Step 3: Repeat this process for each shared folder that is experiencing the issue.

Disabling Remember Credentials

  1. Step 1: An alternative solution is to disable the 'Remember Credentials' option when connecting to non-domain shares. This can be done by right-clicking on the mapped drive and selecting 'Properties', then unchecking the box next to 'Connect using'.
  2. Step 2: This will prevent Windows from storing credentials locally, which should resolve the issue of invalidated credentials after a reboot.

💡 Conclusion

To summarize, the 'Not Accessible' error when connecting to an SMB server share requiring cmdkey deletion is typically caused by Windows 7's handling of stored credentials. By using cmdkey to delete stored credentials or disabling Remember Credentials, users can resolve this issue and enjoy seamless connections to shared folders.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions