In places where many devices are used together, sharing files and resources between computers is usually necessary. A popular method is using Samba (SMB) network shares. But sometimes, you might need to remove or forget your Samba or SMB credentials on your Windows 11 or 10 PC. This can be because you just want to keep things slightly more secure or to fix issues with connecting. This guide will show you how to do this safely, and also gives an alternative way using Command Prompt.
Also see: How to Update Network Drive Login Credentials in Windows 11
Forget Samba (SMB) credentials using Windows Credential Manager
Forgetting your stored Samba or SMB credentials can be easily done through the Windows Credential Manager. This tool lets you handle different types of credentials, including those for network file sharing. The following steps will show you how to do it for both Windows 11 and Windows 10.
- Press Win + S to open the Windows search bar.
- Type in Credential Manager and click on the result to open it.
- Go to the Windows Credentials tab.
- Scroll down to find the credentials for the Samba or SMB share you want to remove.
- Click the downward arrow next to the credential details to see more.
- Click the Remove button next to the details, and confirm your choice when asked.
This method makes sure the credentials are removed from your system, stopping automatic logins to those network shares later.
Pro tip: How to Share Folder in Windows 11/10 Without Password
Remove Samba (SMB) credentials using Command Prompt
If you’re good with command-line tools or need to write a script to remove credentials, using Command Prompt is another way. This method will use the net use
command, which is also pretty useful for network troubleshooting and some management.
- Press Win + X and pick Windows Terminal (Admin). If your Windows 10 is older, you might see Command Prompt (Admin) instead.
- First, it’s helpful to see all active network connections. Type
net use
and hit Enter. This shows all active network connections, including those using SMB or Samba. - Find the network share you want to remove credentials for. It will be listed as
\\ServerName\ShareName
. - Delete the network credentials:
- For network shares shown by server and share name, type the following command and hit Enter.
net use \\ServerName\ShareName /delete
Replace
\\ServerName\ShareName
with the real network share name you found earlier. - For network shares linked to a drive letter, type the following command, swapping
M:
with your drive letter.net use M: /delete
- For network shares shown by server and share name, type the following command and hit Enter.
- You might need to confirm the deletion. Type
Y
and hit Enter to continue. - To check if the network connection is deleted, type
net use
again and make sure it’s gone.
These commands will generally help you to manually remove the network share connection and clear the associated credentials. This is useful if you prefer using command lines for such tasks.
Linked issue: The Specified Network Password is Not Correct (Fix)
Some common issues you might encounter
Even if you follow the suggested methods, there are a few problems that you can run into while trying to remove or forget Samba (SMB) credentials in Windows 11 or 10.
Credentials persist after removal
Even after deleting credentials through either the Credential Manager or Command Prompt, you’re still able to connect to the network share without re-entering credentials.
Solution: Try restarting your computer to apply the changes. Windows sometimes caches credentials temporarily, and a reboot can clear that cache.
Related resource: Disable Network Level Authentication in Windows 11 or 10
Command Prompt returns an error
When using the net use
command to delete credentials, you encounter an error message like “System error 85 has occurred” or “The network connection could not be found.”
Solution: Make sure you are using the right format and spelling for the network share name (\\ServerName\ShareName
). Also, confirm you’re running Command Prompt as an administrator.
Credential Manager doesn’t show the network share
You’ve gone to the Windows Credentials tab in the Credential Manager, but the network share you want to remove credentials for isn’t there.
Solution: It might be because the credentials are in a different section like “Generic Credentials,” or linked to a specific app. Look carefully through all sections to find them.
Access denied after removing credentials
After successfully removing the credentials, you can’t reconnect to the network share and get an “Access Denied” message.
Solution: You may need to reconnect by entering new credentials. Go to the network share like usual, and when asked, type in the new username and password.
- Компьютеры
- Cancel
Как удалить сохранённый пароль к сетевой папке
Иногда необходимо удалить сохранённый пароль к сетевой папке. Windows позволяет ставить галочку при попытке создания подключения к сетевой папке на другой машине и не переспрашивает его в случае неверного указания пароля.
Ответ в том, чтобы воспользоваться командой
Пуск —> Выполнить —> control userpasswords2
и там найти вкладку с сохранёнными логинами и паролями типа такой:
Удаляем нужный…
И можно снова пытаться подключаться с правильным логином и паролем.
Ответ найден тут:
[решено] Как очистить данные (пользователь\пароль) подключения к компьютеру по сети
forum.oszone.net
In a networked environment, controlling access to shared folders is essential. When using Windows 11, the operating system stores login credentials for network shares to streamline access. However, removing these credentials may be necessary to maintain security, resolve connectivity issues, or manage different user accounts.
Saved usernames and passwords for network shares are retained in Credential Manager, providing a centralized way to handle stored credentials. For command-line enthusiasts, cmdkey offers direct credential management from the terminal, giving administrators full oversight of the credentials used to access network resources.
Properly managing these Windows 11 credentials ensures that unauthorized access is prevented and that outdated credentials do not cause unexpected authentication errors. Maintaining clarity and control over stored login information is crucial in environments that demand precision and reliability.
Methods to delete saved username and password for network share in Windows:
-
Open Credential Manager through the Windows search bar.
-
Select the Windows Credentials tab.
-
Click on the dropdown icon for the server or computer that you want to remove from the Credential Manager.
-
Click on the remove link.
-
Confirm the deletion when prompted.
-
Repeat for other credentials as needed.
It might take a while for the credential to be removed from caches. You can either wait or reboot the system.
-
Open Command Prompt or PowerShell as an administrator.
-
List all the stored credentials.
$ cmdkey /list Currently stored credentials: Target: WindowsLive:target=virtualapp/didlogical Type: Generic User: 02erbobtpesylcou Local machine persistence Target: Domain:target=10.1.11.11 Type: Domain Password User: admin
-
Identify the credential associated with the network share.
Target: Domain:target=10.1.11.11
-
Delete the specific credential using cmdkey.
$ cmdkey /delete:10.1.11.11 CMDKEY: Credential deleted successfully.
-
Verify that the credential has been removed.
cmdkey /list
Discuss the article:
Comment
anonymously. Login not required.
@KislyFan
инженер, связист и просто любитель выпить
Как отменить запрос пароля на сетевую папку?
В домашней сети несколько ПК. Компьютер (Win8) имеет расшаренный CD/DVD дисковод. Пробую подключиться к нему с другого ПК (Win10) и получаю запрос учетных данных (логин и пароль). Но парольный доступ отключен, все отстальные ПК подключаются к расшаренному дисководу без проблем : все телефоны, ноутбуки & etc не спрашивают пароль. ПК находятся в одной рабочей группе.
Что можно предпринять.
-
Вопрос задан
-
1077 просмотров
пересоздал рабочую группу на всех устройств в сети, теперь шару видит даже телевизор.
Пригласить эксперта
В доп.параметрах центра управления сетями выключить «общий доступ с парольной защитой»
Но идея не лучшая это.
попробуй посмотреть не сохранено ли ничего лишнего при обращении к ПК с парольной защитой.
пуск — выполнить — cmd
написать команду: rundll32.exe keymgr.dll,KRShowKeyMgr
Откроется вот такое окно
Найти адрес и удалить.
—————
Если не помогло это, то попробуй элементарно при запросе логина и пароля ввести:
логин: anonymous
пароль: guest
обычно срабатывает.
-
Показать ещё
Загружается…