1

I am fiddling around with a network share (samba, but that should not be relevant) in win 2012 server. As I am changing access rights frequently, I would like to have a simple method to revoke the credentials on the client side (I am assuming they get cached somewhere, since they are are still "active" after restarting the samba server), so that I have to "reconnect". Currently I just reboot the win server, but that is rather tedious and time consuming. Ideally, there would be some sort of power shell command to do just the credentials removing?

I see that this post pretty much describes what I want, but the answers given did not help much.

Isaac
  • 1,215
  • 3
  • 26
  • 44

2 Answers2

3

Does net use * /del not accomplish what you're looking to achieve? This should delete all shared network drive credentials.

Additionally, in the thread you reference there is a comment which states that you need not only delete the credentials, but delete the currently active authentication ticket by doing klist purge (docs: Klist)

Tyler D
  • 211
  • 1
  • 4
  • 2
    `net use * /del` does delete all connections listed by `net use`, but I still don't have to reauthenticate. But after adding `klist purge`, it seems to work. I thought I had tried that bevor, but now it works. Thank you for insisting. – Isaac May 13 '13 at 14:17
1

As far as I know, all that method will work. But you must wait for some period of time because the Server that you connect will save your connection session. See this link for more information.

If you ticked the remember my credential at logon promo, then you can type:

rundll32.exe keymgr.dll KRShowKeyMgr

to show all your credentials.

cuonglm
  • 2,386
  • 2
  • 16
  • 20