Samba – clear network share credentials in win 2012

sambawindows-server-2012

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.

Best Answer

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)