Question Locked

Disabaling user account

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi everybody!

I want to stop user from login to computer after specific time say after 9:30am.(as they are latecomers to office)

how can i achieve this? also is there any automated solution to this.

thanks in advance...

8 replies

by dkmahajan

Yes i know using logon hours...but it allows me to block for hours not for half-hours....

so how do i achieve it.

by david.wallis

microsoft say -

Method 2: Using the Net User Command-line Statement
1. Click Start, and then click Run.
2. In the Open box, type cmd, and then click OK.
3. Type net user username /time:logon_times (where username is the name of the user account, and where logon_times are the days and times that you want to allow access to the domain), and then press ENTER.

Use the following information to help you use the /time switch: ? Days can be spelled out (for example, Monday) or abbreviated (for example, M,T,W,Th,F,Sa,Su).
? Hours can be in 12-hour notation (1PM or 1P.M.) or 24-hour notation (13:00).
? A value of blank means that the user can never log on.
? A value of all means that a user can always log on.
? Use a hyphen (-) to mark a range of days or times. For example, to create a range from Monday through Friday, type either M-F, or monday-friday. To create a range of time from 8:00 P.M. to 5:00 P.M., type 8:00am-5:00pm, 8am-5pm, or 8:00-17:00.
? Separate the day and time items with commas (for example, monday,8am-5pm).
? Separate day and time units with semicolons (for example, monday,8am-5pm;tuesday,8am-4pm;wednesday,8am-3pm).
? Do not use spaces between days or times.

Examples
The following examples show how to change the logon times for a specific user account. ? To set John's logon time (8:00 A.M. to 5:00 P.M.) using 24-hour notation, type the following command, and then press ENTER:
net user john /time:M-F,08:00-17:00
? To set John's logon time (8:00 A.M. to 5:00 P.M.) using 12-hour notation, type the following command, and then press ENTER:
net user john /time:M-F,8am-5pm
? To specify logon hours of 4:00 A.M. until 5:00 P.M. on Monday, 1:00 P.M. until 3:00 P.M. on Tuesday, and 8:00 A.M. until 5:00 P.M. Wednesday through Friday for Mary, type the following command, and then press ENTER:
net user mary /time:M,4am-5pm;T,1pm-3pm;W-F,8:00-17:00

by dkmahajan

yes it is. but what i want to do is lock the user account if s/he does not login at specific time..

say if in office shift starts at 9:00am and if user does not login to domain till 9:30am user account must get locked out automatically.

by thumbsup2

If you want them to login BEFORE a certain time, then set the perameters to allow login before that time. Instead of INCLUDING 09:30-17:00, then include day 1 17:30 to day 2 09:30. Any login attempt outside of those perameters, like durring the day when they're working, would be excluded.

by ic-it

to unlock a lot of accounts after reboots, maintenance by admin etc. ;-)

by robo_dev

If your workers are valued employees, they should be free to show up whenever they want.

This discussion is closed to new replies.