Few home network problems are as annoying as this one. You enter the username and password for your Samba shared folder, tick the box to remember them, and everything works. Then you restart the computer, or sometimes just close File Explorer, and Windows 11 asks for the credentials all over again.
The good news is that Windows is not doing this to spite you. Repeated prompts almost always have a concrete cause: a saved password that no longer matches, two different connections fighting over the same server, a credential stored under the wrong name, or a server that keeps rejecting the login so Windows asks again. This guide works through those causes in a sensible order.
Quick Answer
Windows 11 keeps asking for Samba credentials when the saved password in Credential Manager is wrong or outdated, or when Windows is silently trying a different account first. Open Credential Manager, delete the saved entry for your server, disconnect any existing share connections with net use, then reconnect once with the correct Samba username and password and tick Remember my credentials. If the server keeps rejecting the login, reset the Samba password on the Linux side with sudo smbpasswd yourname so both sides match exactly.
Why Windows Keeps Asking Again and Again
Understanding the loop helps you avoid random fixes. When you open a shared folder, Windows tries to sign in automatically. It may use your Microsoft account, a saved credential, or a guest session before it ever shows you a prompt. If the server rejects that attempt, Windows shows the login box. You type the right details and get in, but if Windows stores the new entry in the wrong place, or an older bad entry is still tried first, the next visit starts with rejection again.
There is also a hard rule in Windows networking: one user session cannot connect to the same server with two different sets of credentials at the same time. If one mapped drive uses one account and you try to open another share with a different account, Windows may loop prompts or throw an error instead of explaining the conflict.
Step 1: Remove the Old Saved Credential
Start by clearing out what Windows has stored, because a stale entry is the single most common cause.
- Press the Start button, type Credential Manager, and open it.
- Select Windows Credentials at the top.
- Look under Windows Credentials and Generic Credentials for any entry that names your server, its IP address, or its share. A server can appear twice, once by hostname and once by IP, and both entries matter.
- Expand each matching entry and choose Remove.
- Restart Windows. This clears cached sessions that Credential Manager alone does not remove.
Do not skip the restart. A live session can keep presenting the old password even after the stored entry is deleted.
Step 2: Disconnect Existing Share Connections
Even with credentials removed, an active connection can hold the old identity. Clear it from the command line.
- Open Command Prompt from the Start menu.
- Run
net useto list every current connection to network servers. - Disconnect the problem server with
net use \\SERVER\Shared /delete, using your server and share names. - If several connections point to the same server, remove all of them. You can use
net use * /deleteto clear everything at once, then reconnect only what you need. - Run
net useagain and confirm the list is empty for that server.
Step 3: Reconnect Once, Carefully, With the Full Username
Now make one clean connection and make sure Windows stores it correctly.
- Open File Explorer and type the share path in the address bar, for example
\\SERVER\Shared. Use either the hostname or the IP address, but pick one and stay with it everywhere, including mapped drives. - When the login box appears, enter the username in a form Windows cannot confuse. If the Samba server is a standalone Linux machine, the plain Samba username usually works. If Windows insists on adding a domain prefix, type the server name first, like
SERVER\yourname. - Enter the Samba password exactly. Remember this is the password set with
smbpasswdon the server, which may differ from the Linux login password and from your Windows PIN. - Tick Remember my credentials, then open the share and copy a small test file.
- Restart Windows once more and open the share again. If it opens without a prompt, the fix has held.
Our related guide on fixing the Enter network credentials error in Windows 11 covers the related case where the prompt appears even for shares that should allow guest or simple access.
Step 4: Fix the Password Mismatch on the Samba Server
If Windows still loops after a clean reconnect, suspect the server side. The Samba password may be old, the account may be missing, or the account may be disabled.
- On the Linux server, list Samba accounts with
sudo pdbedit -Land confirm your username exists. - Reset the password with
sudo smbpasswd yournameand choose a fresh password you will also store in Windows. - If the account does not exist, create it with
sudo smbpasswd -a yourname. The Linux user of the same name must exist first. - Check the share settings in
/etc/samba/smb.conf. If the share listsvalid users, your name must be there, or Samba will reject a correct password every time. - Restart Samba with
sudo systemctl restart smbd, then repeat the clean reconnect from Windows and save the new password.
The official Samba smbpasswd manual page documents these account commands, and the wider Samba user documentation on the official wiki explains how standalone server authentication is meant to work.
Step 5: Stop Windows Trying the Wrong Account First
Some systems keep failing because Windows offers an identity the server will never accept, such as a PIN-based Microsoft account session or forced guest access that the server rejects.
- Windows Hello and PIN sign-in: on some builds, network authentication tied to a PIN behaves differently from a password sign-in. If prompts persist, sign in to Windows with a password once, connect to the share, save the credential, and then return to your normal sign-in method.
- Insecure guest logons: Windows 11 Pro and higher editions increasingly block guest access to servers. If your share relies on guest access, the durable fix is to give the share a real Samba user rather than re-enabling insecure guest logons.
- Mixed hostname and IP access: a credential saved for
\\SERVERdoes not apply to\\192.168.1.50. Windows treats them as different servers and prompts separately for each. Standardise on one form.
Step 6: Check Time, Workgroup, and Discovery Basics
These causes are rarer, but they are quick to rule out. Make sure the server clock and the Windows clock are roughly in sync, because large time differences can break authentication in stricter setups. Confirm both machines sit on the same local network and subnet, since connecting through a VPN or a guest Wi-Fi network can change which credentials are offered. Finally, set your Windows network profile to Private for your home network, because the Public profile applies stricter sharing behaviour that can interfere with saved connections.
Common Mistakes and Useful Tips
- Ticking remember but never removing the old entry. Windows may keep the older bad credential and add a second one. Delete first, then save fresh.
- Using the Windows PIN as the share password. The share needs the Samba password from the server, not your PC sign-in PIN or Microsoft account password.
- Connecting one share by name and another by IP. This creates two identities for one server and is a classic cause of endless prompts.
- Using two different Samba accounts for two shares on the same server. Windows allows only one credential set per server in a session. Pick one account with access to both shares.
- Changing the Samba password and testing without restarting Windows. The old session survives. Disconnect, remove, restart, then reconnect.
- Tip: after fixing it, write down which username form worked, such as
SERVER\yourname. Future you will be grateful after the next password change.
Conclusion
Repeated credential prompts are almost never random. They come from a stale saved password, an active connection holding the wrong identity, two routes to the same server, or a Samba account that no longer matches what Windows sends. Clear Credential Manager, disconnect old sessions, reset the Samba password if needed, and reconnect once with a consistent server name and username form. Done in that order, the prompt appears once, gets saved properly, and stays away.
Frequently Asked Questions
Why does Windows ask for credentials every time I restart?
Because the saved credential is missing, wrong, or stored for a different server name than the one you connect with. Remove the old entries in Credential Manager, reconnect using one consistent name or IP, and tick Remember my credentials.
Is the Samba password the same as my Linux password?
Not necessarily. Samba keeps its own password database managed with smbpasswd. The two passwords can be different, and Windows needs the Samba one for shared folders.
Why do I get an error about multiple connections to the same server?
Windows does not allow one session to use two different accounts for the same server. Disconnect all connections to that server with net use, then reconnect every share using the same account.
Does connecting by IP address instead of name really matter?
Yes. Windows stores credentials per target exactly as typed. A login saved for the server name will not be offered for the IP address, so it prompts again. Choose one form and use it everywhere.
Should I enable insecure guest logons to stop the prompts?
That is a weak workaround and recent Windows versions restrict it. Creating a proper Samba user with a password is safer, more reliable, and stops the prompts for the right reason.


Leave a Reply