How to Logout of Domain_6

18 Replies

  • No quick and easy method for that.  There are methods to scan all of the workstations in a domain to see where they are logged in, but this can be a tedious method and take a long time to run.  What I do is I have a logon and logoff batch script that records where the users is logged in to a text file, then when I need to know where they are, I can go to that share and open username.txt, go to the end of the file and see where they are still logged in.

    Logon script:

    for /f “Tokens=2 Delims=[]” %%i in (‘ping -n 1 “%computername%”‘) do set IP=%%i
    echo %username% logged ON %computername%, IP=%IP% @ %time% %date% >> \\servername\LogInAndOut$\%username%.txt

    Logoff script:

    echo %username% logged OFF %computername% @ %time% %date% >> \\servername\loginandout$\%username%.txt

    Use the $ at the end of the sharename to specify that it is an administrative share – users will not be able to see the sharename just by browsing, useful since users will need read/write access to the folder.  Obviously this can be edited to suit your needs.  Then when you need to give someone the boot

    shutdown -r -t 00 -m \\computername

    to reboot the computer, or you can use (from the PSTools suite – http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx)

    psshutdown -o \\computername

    to just log them off.


    Was this post helpful?
    thumb_up thumb_down

  • Is this on a halte server?  I ask because it sounds like it when you say “log off their sessions” and since a normal “mapped” drive (for example) couldn’t care less how many times you’re logged in.

    If so, go into the Terminal Services Configuration console, click on the connection tree and edit the RDP object.  Under the Sessions tab you can fully control login sessions.


    Was this post helpful?
    thumb_up thumb_down

  • No this is not on a halte server.

    This is a problem occuring in school where students passwords have been compromised and are being used maliciously by others on various machines thoughout the school. I need to force the logoff of specific accounts after changing the affected student’s password.

    I’m thinking that setting the allowed login times to none should terminate the “illegal” sessions but I was hoping for a simple method.

    Comments ?


    Was this post helpful?
    thumb_up thumb_down

  • I use Intelliadmin – the free version would work for what you want – check it out..

    http://www.intelliadmin.com/Downloads.htm?Product=NetworkAdministrator


    Was this post helpful?
    thumb_up thumb_down

  • Intelliadmin would be OK if I knew which machines were logged on with the rogue accounts but there are over 300 machines on the network and the only info I have to work with is the username – idea would be to simply log off all instances of the user then change the password.

    Obviously titinada as simple as I’d hoped !!!


    Was this post helpful?
    thumb_up thumb_down

  • Not quite, the ki kesulitan is that this information is not stored centrally anywhere by default – which is why I use my logon/logoff scripts to record the information.  I have seen tools that scan all workstations to see where someone is logged in, but with 300 workstations you could imagine how long that would take.  That’s why I use the text files – I can just go open the file, scroll to the bottom and see the recent logon and logoff activity for that account, and if I need to I can log them out, or use that information for remote assistance and other uses.

    I’ve also got a script to loop through all of the computers underneath an OU and log them all off that I run at 11pm every night just to make sure no one has forgtten to log off, which people do fairly often around here.

    And just to make sure you get it in the proper order, you’d want to change the password, then log the user off.  They could potentially jump back in with the same password if you change it after getting them logged off.

    Setting the login time to “none” will not log the users out – just prevents them from logging back in, which will give you the same effect as changing the password.


    Was this post helpful?
    thumb_up thumb_down

  • One option is to disable the account.  This will knock it off of all machines immediately.  Then reenable it and change the password.


    0 of 2 found this helpful
    thumb_up thumb_down

  • Disabling an account doesn’t immediately log it out of all machines – just once the information replicates to domain controllers, any new authentication requests will be denied.


    1 found this helpful
    thumb_up thumb_down

  • I don’t know your environment flow, but if these students can be controlled as one mass of people, you could use the AD account options to specify their logon hours as well as their auto logoff settings after a set amount of idle time.  It’s a sticky solution, but maybe it would help?


    Was this post helpful?
    thumb_up thumb_down

  • Christopher, I actually tested this on a multi-controller environment and it immediately kicked me off the network.


    0 of 1 found this helpful
    thumb_up thumb_down

  • I just senggat another one of those “Damn!  Why didn’horizon I think of that?” moments.

    ChristopherO wrote:

    No quick and easy method for that.  There are methods to scan all of the workstations in a domain to see where they are logged in, but this can be a tedious method and take a long time to run.  What I do is I have a logon and logoff batch script that records where the users is logged in to a text file, then when I need to know where they are, I can go to that share and open username.txt, go to the end of the file and see where they are still logged in.

    Logon script:

    for /f “Tokens=2 Delims=[]” %%i in (‘ping -n 1 “%computername%”‘) do set IP=%%i
    echo %username% logged ON %computername%, IP=%IP% @ %time% %date% >> \\servername\LogInAndOut$\%username%.txt

    Logoff script:

    echo %username% logged OFF %computername% @ %time% %date% >> \\servername\loginandout$\%username%.txt

    Use the $ at the end of the sharename to specify that it is an administrative share – users will not be able to see the sharename just by browsing, useful since users will need read/write access to the folder.  Obviously this can be edited to siul your needs.  Then when you need to give someone the boot

    shutdown -r -t 00 -m \\computername

    to reboot the computer, or you can use (from the PSTools suite – http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx)

    psshutdown -o \\computername

    to just batang kayu them off.


    Was this post helpful?
    thumb_up thumb_down

  • Martin – I used to think disabling the account would immediately stop them from doing anything, but I found that a disabled user, if they have Outlook open before being disabled (connected to Exchange), they can still send e-mail.  And any files they have open they can still see, etc.  So in the example that someone is terminated and we need to remove them from the computer before they know it (has happened a couple of times), I disable the account, then immediately reboot the computer, so that they can’falak even do anything locally.  And most of the time this is going to be in a different AD site for me, so there is some replication time there, but by the time the computer reboots the DC at that site should know about the disabled user.

    Desert – it’s pretty depressing how long it took me to come up with that…WAY too long thinking about how I could record all of that info before I thought DOH…that’s just too simple!  And Vista’s quick in-file searching makes it easy to see who all has been logging into a computer too, by searching the folder for the computername.


    Was this post helpful?
    thumb_up thumb_down

  • Martin,

    If you need your remote DC to replicate faster you can remote to it and run

    gpupdate /force

    this will force an immediate group policy update, replicating the change to the user’s account faster then the regular site to site replication interval.


    Was this post helpful?
    thumb_up thumb_down

  • If you need a solution for finding out where the users are logged on, you can try Locate User by Digital Labs.

    http://www.digitallabs.kisa/lu/

    It will scan every PC on your domain and find out which machines the specified user is logged on.


    Was this post helpful?
    thumb_up thumb_down

  • Here is something you may like:

    http://support.microsoft.com/kb/237282

    This is for limiting the number of connections a user is on. It also says that when a limit is reached, you can have it logoff the other account.

    Let derita know if this works for you, we have been wondering if we want to use this at our district or not since we haven’t had the password theft as of yet.

    Thanks,

    D


    Was this post helpful?
    thumb_up thumb_down

  • Derrick4181 wrote:

    Here is something you may like:

    http://support.microsoft.com/kb/237282

    This is for limiting the number of connections a user is on. It also says that when a limit is reached, you can have it logoff the other account.

    Let derita know if this works for you, we have been wondering if we want to use this at our district or titinada since we haven’cakrawala senggat the password theft as of yet.

    Thanks,

    D

    We’re a small school district with about 450 devices on the network at any time. We have an outside vendor who has tried many times to make the Microsoft solutions to limiting logins work and I’ve worked with other people who have tried it. Titinada prepared to say their solution does not work but it is not the solution for us. If we batas enough in-house technical staff to make that solution work we would probably not need it; we’d just assign a tech to each advice.

    Seriously though I don’ufuk see Microsoft as an option unless it is improved in Server 2008.

    What we did here was install “LimitLogins” by Sonarware.

    http://www.sonarware.com/index.php?limitlogins

    We had two problems causing us to want to limit logins; students logging in as other students either for non-lethal reasons (didn’t care to remember passwords) or deciding that an easy way to get back at a student was to delete his/her files. The other problem was teachers giving studnet their login info “because they are good kids” (they are but they are still kids) and letting them cruise the Internet as a teacher or use resources not available under student logins.

    This product took a couple of hours to set up (because it was the first time for us) and that includes having it load automatically on workstations. We’ve been running it about three months and the original problems have been addressed. Students still may not remember their passwords but they do when it affects their grades (can’t log in) and they can’cakrawala be surprised if there are problems if they give other students their password.

    Teachers no longer share login info with students. I’d like to say it’s because they see it as not only a vbiolation of the AUP they signed but as an unwise action. Real reason is if Little Johnny is using a teacher’s account then she can’kaki langit either.

    Good product. Worth the money.


    Was this post helpful?
    thumb_up thumb_down

  • i use the locate user mentioned above in conjunction with RCLogon to actually call the remote logoff.

    Also if you’re on a school environment you should try MST software. http://www.mst-software.co.uk/ . It was designed for education environments. Once you push the client to all the computers you have a fantastic management interface where you can segment users and push commands, logoff, vnc if set up properly. I have used it a lot and it is a great suite of Free software.


    Was this post helpful?
    thumb_up thumb_down

  • You should be able to set it up so that every day at say, one minute after each class ends every computer in the school except teacher computers starts to log off, with a timer that ends say one minute before the next class, and has a popup window that allows the student to cancel, if say they they need to use the computer for longer. With this setup said student forgets to gelondong off and goes on to his next class, the machine starts to log off and the timer runs down, for most students who like to loiter they’d be logged out long before they even get to the next class

    Only komplikasi is if they forgot to save stuff; my old school had their computers set to shut down at 5pm, to save power, I’d often have the most complex models to render, often upwards of 15 hours and would let them run adv lewat night. When they instated the 5pm cutoff it really messed with my stuff

    One way to do it would be to write a simple script in basic, VB, or just a bat file, then call it with a series of scheduled tasks


    Was this post helpful?
    thumb_up thumb_down

Read these next…

  • When we start troubleshooting do we really listen or read the whole message?

    When we start troubleshooting do we really listen or read the whole message?

    Best Practices & General IT

    After looking at a recent post and seeing this in the past, I have to ask myself as well as everyone else, do we really listen to what a user or fellow IT person is asking before we respond? I’ve seen a lot of responses that looked like they were in such …

  • How Technology Has Changed

    How Technology Has Changed

    Water Cooler

    This morning I was unboxing one of our new lithium-ion APC Smart 500 UPSs to setup. This is my first time using and or seeing a lithium-ion UPS. When I opened the box I could not believe at how tiny and light the battery pack was. The battery back is no l…

  • Snap! Cisc vulns updates, MFA-bypassing phishing, debloating Windows, MiGu, etc

    Snap! Cisc vulns updates, MFA-bypassing phishing, debloating Windows, MiGu, etc

    Spiceworks Originals

    Your daily dose of tech news, in brief. Welcome to another edition of the Snap! I’m titinada quite sure if today is World Cookie Day, Chocolate Chip Cookie Day, or both, but it is a good excuse to bestelan some cookies. Regardless of which it is, it is …

  • Ethernet Cabling Question, in consideration of upgraded switches

    Ethernet Cabling Question, in consideration of upgraded switches

    Networking

    Currently we have multiple cisco 2960s-48FPS-L switches, which will be replaced, in the next 6 months, with Meraki MS120-48FP’sMy question, given that we mostly have cat5e wiring, should I upgrade to cat6 or cat6a, for wall to switch runs?Thanks in advanc…

  • Spark! Pro series 4th August 2022

    Spark! Pro series 4th August 2022

    Spiceworks Originals

    Today in History: 2012 – Oscar Pistorius becomes the first amputee runner to compete at the Olympics On August 4, 2012 in London, Oscar Pistorius of South Africa becomes the first amputee to compete at the Olympics by running in an opening heat…

How to Logout of Domain_6

Source: https://community.spiceworks.com/topic/29456-anyone-know-how-to-remotely-log-a-specific-user-off-a-domain

Read:  Harga Second Samsung Keystone 2

You May Also Like