I have access to a Samba server using a username and password. To logging the server on windows 10, I put its IP address on the RUN and then input my username and password. Then I can access the data stored in the server normally. However, I don't know how to log off (or Sign out) from that server.
I followed this tutorial about how to access the server, but it does not mention the log off process. I need to log-off and log-in again with my username and password whenever I need to access the server.
Can anyone help?
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.
NET USE
Example Output:
Status Local Remote Network
--------------------------------------------------------------------------------
OK \\name\IPC$ Microsoft Windows Network
OK \\name2\folder Microsoft Windows Network
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.
Another way, to disconnect from every share is to execute net use * /delete
. This will disconnect every Network share you're currently connected to. This is still quicker than logging off and back on.
If you want to create an icon to automatically disconnect all network shares (using a GUI method), you can do the following:
net use * /delete /y
for the Command, then click Next.You can also specify a certain network share, if known in advance, and use that one instead. Using the /y automatically select the yes option in the command.
open notepad:
@echo off
::Disconnect user
net use * /delete /y
msg * /time:5 "You have been successfully Disconnected"
Copy paste save as a bat (file Extention " *.bat ", create a shortcut edit the shortcut to an icon of your choosing... upon double click, the command will be run and a gui popup box will say the message and go away in 5 seconds or wait 5 seconds till appearing... we use this quite a bit at work :)