Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows Server 2003 / Security / July 2007

Tip: Looking for answers? Try searching our database.

How to force User log off when time expires?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shocker - 20 Jul 2007 10:48 GMT
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) - 20 Jul 2007 19:02 GMT
Not without being able to specify logon hours in the account.  I believe that
feature is only in the domain profile.

> 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
[quoted text clipped - 4 lines]
>
> Is it possible to log users off in this case?
shocker - 21 Jul 2007 02:32 GMT
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.

> Not without being able to specify logon hours in the account.  I believe that
> feature is only in the domain profile.
[quoted text clipped - 7 lines]
> >
> > Is it possible to log users off in this case?
Roger Abell [MVP] - 21 Jul 2007 06:56 GMT
> 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.

>> Not without being able to specify logon hours in the account.  I believe
>> that
[quoted text clipped - 11 lines]
>> >
>> > Is it possible to log users off in this case?
shocker - 21 Jul 2007 09:22 GMT
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.

> > So, specifyig logon hours with net user /time is not applicable?
> >
[quoted text clipped - 27 lines]
> >> >
> >> > Is it possible to log users off in this case?
Rob (Microsoft) - 21 Jul 2007 12:40 GMT
You can set up a scheduled task to restart the machine using Shutdown.exe

> 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
[quoted text clipped - 31 lines]
> > >> >
> > >> > Is it possible to log users off in this case?
shocker - 21 Jul 2007 13:06 GMT
Shutting down the computer isn't an option, but thanks for all the responses.

> You can set up a scheduled task to restart the machine using Shutdown.exe
>
[quoted text clipped - 33 lines]
> > > >> >
> > > >> > Is it possible to log users off in this case?
Rob (Microsoft) - 21 Jul 2007 13:58 GMT
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.  

> Shutting down the computer isn't an option, but thanks for all the responses.
>
[quoted text clipped - 35 lines]
> > > > >> >
> > > > >> > Is it possible to log users off in this case?
shocker - 22 Jul 2007 03:36 GMT
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.

> 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,
[quoted text clipped - 39 lines]
> > > > > >> >
> > > > > >> > Is it possible to log users off in this case?
Rob (Microsoft) - 22 Jul 2007 03:54 GMT
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.

> 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
[quoted text clipped - 46 lines]
> > > > > > >> >
> > > > > > >> > Is it possible to log users off in this case?
shocker - 22 Jul 2007 06:32 GMT
Hey, thanks. I'd appreciate that. I hope to hear from you again.

> 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
[quoted text clipped - 50 lines]
> > > > > > > >> >
> > > > > > > >> > Is it possible to log users off in this case?
tin - 26 Jul 2007 17:25 GMT
why don't you use "shutdown -l" to force the use to logoff?

> Hey, thanks. I'd appreciate that. I hope to hear from you again.
>
[quoted text clipped - 75 lines]
>> > > > > > > >> >
>> > > > > > > >> > Is it possible to log users off in this case?
Rob (Microsoft) - 26 Jul 2007 17:46 GMT
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.

> Hey, thanks. I'd appreciate that. I hope to hear from you again.
>
[quoted text clipped - 52 lines]
> > > > > > > > >> >
> > > > > > > > >> > Is it possible to log users off in this case?
shocker - 27 Jul 2007 02:14 GMT
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

> Hey, thanks. I'd appreciate that. I hope to hear from you again.
>
[quoted text clipped - 52 lines]
> > > > > > > > >> >
> > > > > > > > >> > Is it possible to log users off in this case?
tin - 27 Jul 2007 20:12 GMT
are you talking about logging of terminal users?
you can use the tsdiscon.exe for that!

> Thanks Rob and tin.
> the shutdown /i option affects all users so this wont work. Thanks though
[quoted text clipped - 82 lines]
>> > > > > > > > >> >
>> > > > > > > > >> > Is it possible to log users off in this case?
shocker - 28 Jul 2007 02:02 GMT
No, I'm talking about a locally log on user.

> are you talking about logging of terminal users?
> you can use the tsdiscon.exe for that!
[quoted text clipped - 85 lines]
> >> > > > > > > > >> >
> >> > > > > > > > >> > Is it possible to log users off in this case?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.