LOGOFF, version 0.1 pre-beta, October 1997

A tool for Windows NT to log off users from their workstations remotely or unattended.

Copyright (C) 1997 by

Alexander Frink
Hermann Schauss Str. 8
65232 Taunusstein
Germany
Alexander.Frink@Uni-Mainz.DE

This program is free software under the GNU General Public License. See the file LICENSE for details. The latest version of LOGOFF can be found at http://wwwthep.physik.uni-mainz.de/~frink/nt.html.


Contents

  1. Introduction
  2. Legal stuff
  3. Usage

1. Introduction

Windows NT offers no possibility for adminstrators to force users to log off over the network, e.g. to prohibit use after a certain time. One can disconnect users from a server, but they still can use the local machine where they are logged on to (even after the logon hours have expired, these are only checked during the logon process).

2. Legal stuff

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

For short, the main aspects of the GNU General Public License are in my personal interpretation which may not be 100% accurate (I am a physicist, not a lawyer):

3. Usage

This program consists of two parts: INITLO, a program which runs with SYSTEM privilege and initiates the logoff proces, and LOGOFF, which runs under the user's security context and does the actual logoff, because only the user himself can call the ExitWindowsEx() API with the EWX_LOGOFF parameter (at least I have not found any other way).

Copy INITLO.EXE and LOGOFF.EXE somewhere to the machine where you want to log off the user (you can do this over the network with NET USE \\machine\c$ as Administrator). The designated method to start INITLO is with the AT command (or more comfortably with the SOON command from the NT Resource Kit, because you do not have to specify an absolute time). You can use AT to start processes on other machines on your network. The Schedule service must run on the target machine. If it does not, you can start it remotely with NETSVC from the NT Resource Kit. Therefore you should always be able to use INITLO/LOGOFF even on unprepared workstations completely over the network.

INITLO must run under an account which has SE_DEBUG_NAME, SE_ASSIGNPRIMARYTOKEN_NAME, SE_CREATE_TOKEN_NAME and SE_SECURITY_NAME privileges. By default, only the SYSTEM account (not even the Administrator) has theses privilege. Take this into account if you have configured the Schedule service to run under a different user.

Command line options

usage is
initlo [-g grace] [-p program] [-t text]
where Ordering of command line switches is arbitrary.

Examples

Please note (these are in general the most common problems when using the AT command):
Copyright (C) 1997 by Alexander Frink