Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Security (https://www.askmehelpdesk.com/forumdisplay.php?f=476)
-   -   Force log off on a domain (https://www.askmehelpdesk.com/showthread.php?t=211144)

  • Apr 30, 2008, 09:30 AM
    hardhatinc
    Force log off on a domain
    How can I set up a group policy on a domain to log off a user at a certain time? I need my backups to run at 10, but I need all of the computers logged off at 9. I have set the log on hours, what else can I do?
  • May 3, 2008, 11:02 AM
    IT Helpp
    Just for your information, if you would like to schedule a log off time, you can also create a TXT document with the following content. Name it logoff.bat and then create a Schedule Task to run it:
    C:\Windows\system32\shutdown.exe –l –f
    How To Schedule Tasks in Windows XP
    How To Schedule Tasks in Windows XP
  • May 5, 2008, 06:10 AM
    hardhatinc
    I know about the script, but my boss was wanting me to implement a group policy on the DC that would log users off at a certain time. Right now, I have a script on the DC to restart all of the computers.
  • May 5, 2008, 06:16 AM
    ScottGem
    I know you can restrict logons to a certain time frame. I'm not sure, however, if when the time frame elapses, it will log the user off.
  • May 5, 2008, 06:42 AM
    retsoksirhc
    This would take 2 steps.

    First, set the hours the account is allowed to be logged in, under the user account in active directory. You can find it under the Logon Hours button.

    Then to enforce these hours, you have to set up group policy. It's under Computer Settings/Security Settings/Local Policies/Security Options/Network Security: Force Logoff When Logon Hours Expire
  • May 5, 2008, 06:44 AM
    hardhatinc
    I tried that and it only disconnects them from network resources. It does not log them off the computer.
  • May 5, 2008, 06:50 AM
    ScottGem
    Tried, which? My suggestion or Chris's?
  • May 5, 2008, 06:50 AM
    retsoksirhc
    Do you only need everyone logged off so that you can run the backups? If so, that will close all the open network handles, and all the files will be ready for backup.

    If you actually need the machines to log off, you could try ITHELPP's suggestion with a batch file, or you could try the winexit.scr method Microsoft suggests for logging off an idle user... just Google winexit.scr for more info on that.
  • May 5, 2008, 06:54 AM
    hardhatinc
    Like I said before, I do have a .bat file on the server and scheduled for a daily task. It reboots all computers. I just wish there was a group policy that would log them off at a certain time.

  • All times are GMT -7. The time now is 12:29 PM.