Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a colleague that has a Windows Peer-To-Peer Network. He has an application such that he has shared network folders where he wants an employee to be able access the shared folder by typing in a password, then some time later, if another employee at the same work center wants to access the same shared network folder, he wants the employee to have to retype the password to gain access to the share.

Currently, Windows is caching the password so the 2nd employee has automatic access to the share.

What do you recommend?

The way I see it, he could:

  1. log out and log back in for the 2nd employee. I think that will clear the password cache
  2. Find a way to clear the cached password (I don't know how to do that), perhaps through Windows Scripting Host

I would imagine that since he doesn't have a Server, installing a Windows Server on the network is not really an option.

share|improve this question
up vote 2 down vote accepted

I think you're looking for "net use RESOURCE /delete /Y"

If you're mapping drive letters, substitute it in for RESOURCE . If it is a network folder that isn't mapped, substitute the UNC of the folder for RESOURCE ie "\computer\folder"

Run "net use" to show all your 'connected' resources.

share|improve this answer

The "poor man's trust relationship" and peer-to-peer file sharing scenario:

  • Create two user accounts on the "client" computer-- one for each employee. Set passwords on these accounts.

  • Create the same two user accounts on the "server" computer-- again, one for each employee, with exactly the same spelling of usernames and exactly the same password.

  • Open the local group policy on the "server" computer (Start / Run / GPEDIT.MSC) and modify the "Network access: Sharing and security model for local accounts" to the "Classic" setting (located under the "Security Options" node of the "Local Policies" node of the "Security Settings" node of the "Windows Settings" node of the "Computer Configuration" node).

If the user changes their password on the "client" computer they'll need to have it changed on the "server" computer, too. (Here's where a Domain is your friend.)

You can use NTFS permissions on the "server" computer to protect files and folders.

share|improve this answer

You could make a bat file that would connect, prompting for credentials, then run windows explorer. Once explorer is closed, the script would disconnect the drive and exit.

Ghetto I know.

share|improve this answer
Here is a better way from MS: – MathewC Jun 9 '09 at 17:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.