Disconnect TCP connections shown in Netstat

G

Guest

Basically what I want to do is disconnect one of the TCP connections that
shows Established when running netstat. I know that in theory you can end
the process associated with the connection, but in this case its System.
Don't think that one is going to die properly.

A bigger use would be to make a connection to a network share using a
different name than I'm currently connected as. Windows won't allow for
this. I'd have to disconnect any active connections to that server before
re-connecting with new credentials. I need a way to manually kill that TCP
connection. I'd prefer not to download any utilities to to this as it seems
something that should be doable in the OS. But Microsoft has left
head-scratching holes in their utilities before.
 
J

John Wunderlich

[...snip...]
A bigger use would be to make a connection to a network share
using a different name than I'm currently connected as. Windows
won't allow for this. I'd have to disconnect any active
connections to that server before re-connecting with new
credentials.
[...snip...]

Windows does allow this from the command line. Try bringing up a
command window and entering the command:

net use * \\computername\sharename password /user:domain\username

If you omit the password, it will prompt.
Be careful of forward slashes vs. back slashes.
This will allow connection to network share with different credentials.

HTH,
John
 
G

Guest

Unfortunately, John, it does not. This is just the command line way of
trying to do map a network drive with given credentials through explorer.

The same message comes through the command line.
"Multiple connections to a server or shared resource by the same user, using
more than one user name, are not allowed. Disconnect all previous
connections to the server or shared resource and try again.."

Windows does not allow you to connect to a server with two different sets of
credentials at the same time. This I know and accept. I would just like a
way to disconnect the first connection so I can establish a new one with
different credentials.

John Wunderlich said:
[...snip...]
A bigger use would be to make a connection to a network share
using a different name than I'm currently connected as. Windows
won't allow for this. I'd have to disconnect any active
connections to that server before re-connecting with new
credentials.
[...snip...]

Windows does allow this from the command line. Try bringing up a
command window and entering the command:

net use * \\computername\sharename password /user:domain\username

If you omit the password, it will prompt.
Be careful of forward slashes vs. back slashes.
This will allow connection to network share with different credentials.

HTH,
John
 
J

John Wunderlich

Unfortunately, John, it does not. This is just the command line
way of trying to do map a network drive with given credentials
through explorer.

The same message comes through the command line.
"Multiple connections to a server or shared resource by the same
user, using more than one user name, are not allowed. Disconnect
all previous connections to the server or shared resource and try
again.."

Windows does not allow you to connect to a server with two
different sets of credentials at the same time. This I know and
accept. I would just like a way to disconnect the first
connection so I can establish a new one with different
credentials.

I'm sorry, I misunderstood. I didn't realize you already had a
connection in place.

I've always had luck right-clicking on "My Network Places", then
selecting the "Disconnect Network Drive" option. Sometimes my
connection shows up greyed-out but selecting it anyway and clicking
"OK" seems to break the connection and allows me to login with
different credentials.

Another attack (particularly if you have an administrative connection
to ipc$) would be to open a command prompt and type in
net use
and examine your current connections. Find the one you want to
disconnect and type in the command
net use \\computer\share /delete
to disconnect.

Between these two methods, I've always been able to disconnect.

HTH,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top