I'm connected to a Linux smb share via Samba from Windows and have logged in using account "jim". Now I want to logout of Jim's account and login as "fred", because account Jim has no access to Fred's home share.
I can see an active smb connection via PowerShell:
PS> Get-SmbConnection ServerName ShareName UserName Credential Dialect NumOpens ---------- --------- -------- ---------- ------- -------- 10.0.1.21 jim DESKTOP-UTS9E27\Jim Bob DESKTOP-UTS9E27\jim 3.1.1 0
There is a PowerShell command Close-SmbSession, but I have no sessions; only connections:
PS> Get-SmbSession PS>
I accessed the share from an Explorer window by navigating to
\\10.0.1.21\jim and logging in with the correct credentials. I did not map the directory to a drive letter. Therefore my connection is not visible from
C:\>net use New connections will be remembered. There are no entries in the list.
I can't revoke the credential because it's not listed in the Credential Manager:
If I try to access Fred's home directory explicitly with
\\10.0.1.21\fred, Windows will provide a login dialog:
However, using Fred's credentials gives an error that tells me that I'm already logged in as another user on this account and multiple connections as other users is not allowed:
So it's pretty clear that I need to explicitly log out of one user before I can log in as another. But I don't know how to do that. At this point, I have to reboot my computer, because I can't find any way to logout of one user once I've logged in. Closing the Explorer window with the previous connection retains that login. How do I log out of Jim's credentials so I can login as Fred to access a share with a different permission?