Solved

How do you simply log off windows 2000 network connection without rebooting?

Posted on 2006-06-22
14
199 Views
Last Modified: 2012-05-05
Is there a quick and simple way of terminating a windows 2000 login without having to close down my running programs. All I want to be able to do is log into the computer over the network and then disconnect and log in under a different user. Is there a simple way of doing this, ie a batch script or something?

cheers
0
Comment
Question by:pgilfeather
  • 8
  • 5
14 Comments
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 16960760
>>Is there a quick and simple way of terminating a windows 2000 login without having to close down my running programs.
no, when a user logs off, all programs they had open will be close,, this is by design and there is no way around it.

>>All I want to be able to do is log into the computer over the network and then disconnect and log in under a different user.
how are you connecting remotely?  Remote desktop, VNC?  In either case, you simply choose logoff, and then log back on as the other user.  What do you mean by 'disconnect', do you mean log off?
0
 

Author Comment

by:pgilfeather
ID: 16960899
Sorry, I just assumed you would realise I am using windows 2000 security.

So I go start...run and type in

\\serverName\Folder   & hit return

A windows login prompt appears

I put in a username & password & then on hitting return I am logged into windows 2000

.........suppose I want to log back into windows under another account? How do I get the login prompt to appear? Yes I know I can reboot or log off my machine and go back in but this takes time and I want to be able to do it quickly without having to shut down any programmes I have running.

Hope this is clear now.

cheers
0
 
LVL 5

Expert Comment

by:mkdonohue
ID: 16961130
I believe you are looking for the command line tool net session

The syntax of this command is:
NET SESSION
[\\computername] [/DELETE]

NET SESSION lists or disconnects sessions between the computer and other computers on the network. When used without options, it displays information
about all sessions with the computer of current focus.

\\computername  Lists the session information for the named computer.
/DELETE         Ends the session between the local computer and  computername, and closes all open files on the computer for the session. If computername is omitted, all sessions are ended.

Is that what you needed?
0
 

Author Comment

by:pgilfeather
ID: 16969217
I think this is what I may be looking for, but can this be executed from the logged on client machine?
0
 
LVL 5

Accepted Solution

by:
mkdonohue earned 500 total points
ID: 16969971
Ah, ok I've made this harder than it needs to be.

From the logged on client just use the following command:

net use \\serverName\Folder /delete

You should get the response:

\\serverName\Folder was deleted successfully.

That closes the share connection.

0
 

Author Comment

by:pgilfeather
ID: 16982310
mkdonohue


That did the trick. Thanks very much.
0
 

Author Comment

by:pgilfeather
ID: 16982407
Is it possible to run something similar either from the client end or server to log off all clients that are logged on?

cheers
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

Author Comment

by:pgilfeather
ID: 16982476
Ah, theres a little problem with this, if the user has ticked remember password checkbox then the script does not work.
0
 
LVL 5

Expert Comment

by:mkdonohue
ID: 16984484
net use \\serverName\Folder /delete is supposed to kill even persistent connections. That should work. What exactly is happening?
0
 

Author Comment

by:pgilfeather
ID: 16984524
It just isnt killing the connection. It works fine when there is not a persistent connection.
0
 
LVL 5

Expert Comment

by:mkdonohue
ID: 16985728
That doesn't make sense. I know it deletes persistent connections.

I even checked with MS to be sure:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_use.mspx?mfr=true

If you scroll down to the /persistent:{yes | no} section, even MS' documentation states that it kills persistent connections.

That is VERY odd.

I will do some additional research and will let you know.
0
 

Author Comment

by:pgilfeather
ID: 16990723
Is the script supposed to be run from client or server?
0
 
LVL 5

Expert Comment

by:mkdonohue
ID: 16996201
This should run from the client.
0
 

Author Comment

by:pgilfeather
ID: 16999551
Yes thats where I am running it from, the client.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now