Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 0x80004005

Error 0x80004005 on a shared folder: unauthenticated guest access blocked

11 min read Updated October 5, 2026 Networking, Sharing & Printing

Fix it now

Microsoft names “Error code: 0x80004005. Unspecified error” as one of the messages you get when a shared folder will not open, alongside the one about security policies blocking unauthenticated guest access. The client is declining to connect without proving who it is. Give it an account to prove it with.

Run these on the client, in a Command Prompt, in order

cmdkey /list
net use * /delete
net use \\nas\share /user:nas\username *
  1. Confirm the diagnosis before changing anything. Open Event Viewer, Applications and Services Logs, Microsoft, Windows, SMBClient, Security, and look for event 31017: “Rejected an insecure guest logon.”
  2. On the device or server holding the share, create a named user account with a real password and give it access to the share.
  3. Remove any stale stored credential: find the entry in cmdkey /list and delete it with cmdkey /delete: followed by the target name exactly as listed.
  4. Reconnect with the new account, qualifying the user name with where the account lives: nas\username for an account on the device, .\username for a local account on a Windows host.
  5. Tick the option to remember the credential so mapped drives reconnect at logon.
  6. If the account exists but is refused, check that it is enabled and has a password set. A blank password is rejected over the network by default.

Do not re-enable guest access to make this go away. Microsoft’s own recommendation is not to enable insecure guest logons, and the setting applies to every share that machine touches rather than only the one you were trying to reach.

If the share opens without a prompt and survives a reboot, you are done. If not, the next section explains which of the four refusals you actually got.

Why it happens

A guest connection is one where the client offers no usable credential and the server accepts it anyway. That gives you no way to know that the machine answering is the file server you meant to reach, and no way to protect what is sent to it. Windows logs a specific event each time it refuses one, event 31017 in the SMB client security log, whose text reads: “Rejected an insecure guest logon. The machine attempted to connect to the server using an insecure guest logon. The server denied the connection.” That event is the fastest confirmation you will get, and it is worth reading before you change anything.

The reason this surprises people is that the device often has not changed at all. A storage appliance or a router with a USB port shares its contents anonymously, and it worked for years. What changed was the client. The defaults differ by edition, and Microsoft publishes the list: guest credentials are disabled by default on Windows 10 Enterprise, Pro for Workstations and Education from version 1709, on Windows Server 2019 and later, and on Windows 11 Pro from Insider build 25267 – but Windows 10 Home and Pro still allow guest authentication by default. So a machine that upgraded, or a colleague on a different edition, behaves differently for reasons nobody changed.

The neighbouring codes describe the cases where a credential was offered and rejected, and all three are better news than the guest refusal because they mean authentication was at least attempted. 0x80070056 is Win32 86, “The specified network password is not correct.” 0x8007052F is Win32 1327, whose published text lists the causes: blank passwords are not allowed, sign-in times are limited, or a policy restriction has been enforced. 0x80070533 is Win32 1331, “This user can’t sign in because this account is currently disabled.”

The share only offers anonymous access

You have this one if Event 31017 appears in the SMB client security log and the device has no user accounts configured at all.

  1. Create a named account with a password on the device, through its own administration interface.
  2. Grant that account access to the share, and remove anonymous access if the device allows it.
  3. Connect from Windows with those credentials, qualifying the user name with the device name.
  4. Save the credential so mapped drives reconnect at logon.

This costs nothing. It is a configuration change on the device, and it leaves you better off, because you now know which machine you are connecting to.

Windows has cached the wrong credential

You have this one if The connection fails immediately with no prompt, or a prompt is rejected instantly, while another machine connects fine.

  1. List what is stored with cmdkey /list and look for the host in any of its name forms.
  2. Delete the stale entry with cmdkey /delete: and the target name exactly as listed.
  3. Drop live sessions with net use * /delete, because an existing session is reused before any new credential is considered.
  4. Reconnect and enter the credential again.

The account has a blank password or is otherwise restricted

You have this one if 0x8007052F. The same account works when you sign in at the device itself.

  1. Set a real password. Windows blocks accounts with blank passwords from logging on over the network by default, and that default is worth keeping.
  2. Check logon hours and workstation restrictions on the account if the server is a Windows machine, since the published text names both.
  3. Retest immediately after the change rather than waiting; replication and caching will otherwise confuse the result.

The account is disabled, or the name is not qualified

You have this one if 0x80070533, or the credential is refused even though you are certain it is correct.

  1. Confirm the account is enabled on the machine or device that owns it.
  2. Qualify the user name with where the account lives: nas\username on the device, .\username for a local account on a Windows host.
  3. Without qualification Windows may send a domain account of the same name, which the device will refuse and you will not see why.

Someone has re-enabled insecure guest logons

You have this one if The share works again after a policy change, and nobody can say what the change gave up.

  1. Treat this as a finding rather than a fix. Event 31018 records that an administrator enabled AllowInsecureGuestAuth, and 31022 records each connection allowed because of it.
  2. Roll it back once the device has a real account configured.
  3. Where it must stay briefly, apply it to the one machine that needs it rather than to a policy covering the estate.

Full reference

The events this leaves behind

All of these are in Applications and Services Logs, Microsoft, Windows, SMBClient, Security. Reading them turns a guess into a fact in under a minute.

Event Level What it records
31017 Error Rejected an insecure guest logon. The machine attempted to connect using an insecure guest logon and the connection was denied
31018 Warning An administrator has enabled AllowInsecureGuestAuth. Clients using insecure guest logons are more vulnerable to attackers-in-the-middle, phishing and malware
31022 Warning Allowed an insecure guest logon. The server attempted to log the user on as an unauthenticated guest and the client allowed it

A 31017 means the client refused. A 31022 means it did not, which tells you the protection has been switched off on this machine and is worth raising even if the share now works.

Where the setting lives, if you have to look at it

Route Location
Group Policy Computer Configuration, Administrative Templates, Network, Lanman Workstation, “Enable insecure guest logons”
Registry HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation, value AllowInsecureGuestAuth, DWORD

One detail catches people who do turn it on and find it still does not work: Microsoft states that both the SMB signing and SMB encryption policies must be disabled for guest logons to be used. So a machine with signing required will keep refusing regardless of the guest setting, and the reader concludes the setting did nothing.

Reading which refusal you got

What you see What happened
Event 31017 in the SMB client security log No usable credential was offered and the client refused to continue
A prompt that reappears after every attempt The credential is being rejected, not ignored
0x8007052F The account exists but may not log on this way; a blank password is the usual reason
0x80070533 The account is disabled on the server or device
It works for one user and not another A stale stored credential on the failing machine

Doing it properly on a small network

  • Give every device that shares files at least one named account with a real password, even at home. It costs five minutes once.
  • Use a different account for the device than the one people sign into Windows with, so a compromised desktop credential does not open the storage.
  • Store the credential in Credential Manager rather than typing it into a script, and record which machines hold it.
  • Where a device genuinely cannot do accounts, treat that as its end of life rather than as a reason to lower the client.
  • Check the phone and television that still connect. They connect because the share is open to anything on the network, which is an argument for fixing it rather than for leaving it.

The setting that permits unauthenticated guest connections is estate-wide if you apply it by policy, and it affects every share the machine touches rather than only the one you were trying to reach. Export the branch before editing it, prefer the policy setting to a manual edit, and remember Microsoft’s own recommendation is not to enable it.

Every code this article covers

Code What it points at Source
0x80004005 An unspecified failure. Microsoft names “Error code: 0x80004005. Unspecified error” among the messages seen when a shared folder cannot be opened, alongside the guest-access refusal Microsoft Learn
0x80070056 Win32 86, ERROR_INVALID_PASSWORD: the specified network password is not correct Microsoft Learn
0x8007052F Win32 1327, ERROR_ACCOUNT_RESTRICTION: account restrictions are preventing this user from signing in – for example blank passwords are not allowed, sign-in times are limited, or a policy restriction has been enforced Microsoft Learn
Event ID 31017 Microsoft-Windows-SmbClient/Security, task RejectedInsecureGuestAuth: rejected an insecure guest logon, because the machine tried to connect using one and the connection was denied Microsoft Learn
0x80070533 Win32 1331, ERROR_ACCOUNT_DISABLED: this user can’t sign in because this account is currently disabled Microsoft Learn

Confirm the fix worked

  1. Open the share and confirm no credential prompt appears.
  2. Check the SMB client security log and confirm no new 31017 has been recorded.
  3. Confirm no 31022 is being logged either, which would mean guest access is still being used.
  4. Reboot and confirm any mapped drive reconnects without prompting.
  5. Run net use and confirm the connection is listed against the account you intended, not a blank one.

Questions people ask about this

Does fixing this cost anything?

No. Creating an account on the device and saving the credential in Windows costs nothing at all. There is no product to buy here, and anyone selling you one for this is selling you the wrong thing.

Is it really so bad to turn guest access back on?

It is worse than it looks. An unauthenticated connection cannot verify that the machine answering is the one you meant, so a device on the same network can present itself as your file server and be believed. Microsoft’s own warning names attackers-in-the-middle, phishing and malware, and its recommendation is not to enable it.

My colleague on Windows 10 Pro connects fine. Why can I not?

Because the default differs by edition. Microsoft publishes that Windows 10 Home and Pro allow guest authentication by default, while Enterprise, Pro for Workstations and Education have had it off since version 1709. You are not comparing like with like.

I turned the setting on and it still fails.

Check signing. Microsoft states that the SMB signing and SMB encryption policies must both be disabled for guest logons to work, so a machine that requires signing keeps refusing whatever the guest setting says. That is a good moment to stop and create an account on the device instead.

Do I need a domain account, or will a local one on the device do?

A local account on the device is fine. What matters is that a credential is offered and verified. Qualify the user name with the device name so Windows sends the right one.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix Remote Desktop cannot verify the identity: certificate error 0x80090325 License Error Trust relationship failed: error 0xC000018D between the PC and the domain Free Fix VPN error 868: the remote access server name could not be resolved Free Fix VPN error 798 and 13806: no usable certificate for IKEv2 or EAP logon
โ† Back to Knowledge Base