In a networked environment, Windows 11 users can access shared folders across various machines. The user can allow the operating system to remember the credentials once authenticated to the network shares, enabling smoother future access. However, there might be instances where you want to clear the saved login details for security reasons, to use a different account, or to troubleshoot connection issues.
Login information that you use to log in to other computers for network shares is stored in Windows's Credential Manager and cached in applications such as File Manager. You can use Credential Manager to manage the saved username and passwords, or if you're one of the more advanced users, you can use the command-line tool, cmdkey
Methods to delete saved username and password for network share in Windows:
It might take a while for the credential to be removed from caches. You can either wait or reboot the system.
$ 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
Target: Domain:target=10.1.11.11
$ cmdkey /delete:10.1.11.11 CMDKEY: Credential deleted successfully.
Comment anonymously. Login not required.