Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to force User log off when time expires?

413 views
Skip to first unread message

shocker

unread,
Jul 20, 2007, 5:48:00 AM7/20/07
to
I want to force a user to log off when his logon hours expire.
In the Network Security category (under Group Policy), I enabled the Force
Logoff When Logon Hours Expire policy, but users are never logged off.

I running Windows Server 2003 as a standalone (no domain or AD). the server
is just a rubust workstation, but allow remote users to log in simultaneously.

Is it possible to log users off in this case?

Rob (Microsoft)

unread,
Jul 20, 2007, 2:02:01 PM7/20/07
to
Not without being able to specify logon hours in the account. I believe that
feature is only in the domain profile.

shocker

unread,
Jul 20, 2007, 9:32:02 PM7/20/07
to
So, specifyig logon hours with net user /time is not applicable?

The user is now restricted from logging on based on the times set in net
user, but they are never logged off if they account is already logged on when
the time expires.

Roger Abell [MVP]

unread,
Jul 21, 2007, 1:56:32 AM7/21/07
to
"shocker" <sho...@discussions.microsoft.com> wrote in message
news:C7E3B228-FBF1-45F8...@microsoft.com...

> So, specifyig logon hours with net user /time is not applicable?
>
net user /time
controls when an account can log on, it does not kick logged on
account out

> The user is now restricted from logging on based on the times set in net
> user, but they are never logged off if they account is already logged on
> when
> the time expires.
>

The time set in the network security policy you mentioned only
controls network access and will close off sessions to network
shares based on the logoff time; it has nothing to do with local
login sessions.

shocker

unread,
Jul 21, 2007, 4:22:01 AM7/21/07
to
Can this accomplish with scripting? I not very familiar with Windows
scripting, but I'm just curious to know if what I want to do is possible on a
local machine.

Rob (Microsoft)

unread,
Jul 21, 2007, 7:40:00 AM7/21/07
to
You can set up a scheduled task to restart the machine using Shutdown.exe

shocker

unread,
Jul 21, 2007, 8:06:00 AM7/21/07
to
Shutting down the computer isn't an option, but thanks for all the responses.

Rob (Microsoft)

unread,
Jul 21, 2007, 8:58:28 AM7/21/07
to
Shutdown.exe can be used to reboot a box not just shutdown. So if you have a
time set for all users not to logon because of backup schedules or whatever,
a Shutdown command with a R switch will reboot the system.

shocker

unread,
Jul 21, 2007, 10:36:00 PM7/21/07
to
Thanks again Rob. It's just that rebooting the machine is not what I want.
There are only specific users 2 of 5 that need to be forced to logoff if
their time expires. The other users may be active or simply have tasks
running that rebooting will kill.

I guess this is just a limitation of Windows Server 2003 standalone.

Rob (Microsoft)

unread,
Jul 21, 2007, 10:54:01 PM7/21/07
to
Sorry I couldn't be of more assistance. I'll check with some folks when I
get back in the office on Tuesday to see if there is a script that you can
run to force logoff the user.

shocker

unread,
Jul 22, 2007, 1:32:01 AM7/22/07
to
Hey, thanks. I'd appreciate that. I hope to hear from you again.

tin

unread,
Jul 26, 2007, 12:25:30 PM7/26/07
to
why don't you use "shutdown -l" to force the use to logoff?

"shocker" <sho...@discussions.microsoft.com> wrote in message

news:AA9BBEC7-E9FA-465B...@microsoft.com...

Rob (Microsoft)

unread,
Jul 26, 2007, 12:46:02 PM7/26/07
to
I checked with our CPR team and they don't have a script. Looks like you
will have to use the shutdown -l command in a scheduled task.

shocker

unread,
Jul 26, 2007, 9:14:01 PM7/26/07
to
Thanks Rob and tin.
the shutdown /i option affects all users so this wont work. Thanks though
for your attention. I has been much appreciated.

s.ali

tin

unread,
Jul 27, 2007, 3:12:50 PM7/27/07
to
are you talking about logging of terminal users?
you can use the tsdiscon.exe for that!

"shocker" <sho...@discussions.microsoft.com> wrote in message

news:97F07D13-1F86-4AB0...@microsoft.com...

shocker

unread,
Jul 27, 2007, 9:02:02 PM7/27/07
to
No, I'm talking about a locally log on user.
0 new messages