Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I make Windows 7 log off from a password-protected Samba network drive?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

Open CMD, type NET USE X: /DELETE or NET USE \\SERVER\SHARENAME /DELETE

where X: is your drive and \\SERVER\SHARENAME your fully qualified share name.

Step by Step

1) View all network connections:

NET USE

Example Output:

Status                 Local       Remote            Network
--------------------------------------------------------------------------------
OK                                 \\name\IPC$       Microsoft Windows Network
OK                                 \\name2\folder    Microsoft Windows Network

2) Then using the Remote name we can disconnect using on of the following statements, depending on which one we want to disconnect from:

Net use \\name /delete

OR

Net use \\name2\folder /delete

Example Output: (given the above \\name\IPC being connected))

 Net use  \\name /delete
 \\name was deleted successfully.

Edit Another way, to disconnect from every share is to execute net use * /delete. This will disconnect every Network share you're currently connected to. Still quicker than logging off and back on.

share|improve this answer
1  
thanks, good answer...but is there a GUI way of doing the same? I am actually asking not for myself(I switched to linux ages ago) but for a friend of mine who is not too tech-savvy. Thanks again. –  Alex N. Oct 31 '11 at 2:38
    
You can create it as an icon (shortcut) or right-clck the drive in My Compute and click Disconnect –  Canadian Luke Oct 31 '11 at 14:39

Your Answer

 
discard

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.