XP: Limit Login Access to Specific Times and Days

By using the technique described in this tech-recipe, you can limit when your children or your employees are able to use a system.


Limiting login access is very beneficial in multiple circumstances. My children have personal accounts on our home box and log-in to the Internet from these accounts. Using this technique, I can make sure that they can log-in only during certain times of the day (as in when I can supervise them). Additionally, several computers at my office had unwanted programs installed on them at night. Some employees were staying all night surfing and absorbing bandwidth. This technique limits their use to more appropriate hours.

The steps used to activate limitations are as follows:

1. Click on the Start Menu.
2. Click Run.
3. Type CMD in the Open textbox and click OK.
4. In the command window type:
net user accountname /times:M-F,8am-8pm; Sa,8am-5pm;Su,8am-1pm
Replace accountname with the name of the account you wish to limit. The time command is a bit complex, but the above example is easy to replace with the appropriate values. Below, you will find further information from Microsoft regarding the format of the time command:

Specifies the times that users are allowed to use the computer. Time is limited to 1-hour increments. For the day values, you can spell out or use abbreviations (that is, M,T,W,Th,F,Sa,Su). You can use 12-hour or 24-hour notation for hours. If you use 12-hour notation, use AM and PM, or A.M. and P.M. The value all means a user can always log on. A null value (blank) means a user can never log on. Separate day and time with commas, and units of day and time with semicolons (for example, M,4AM-5PM;T,1PM-3PM). Do not use spaces when designating times.

The steps to turn off limitations are as follows:
1. Click on the Start Menu.
2. Click Run.
3. Type CMD in the Open textbox and click OK.
4. In the command window type:
net user accountname /times:all
Once again, replace accountname with the name of the account you wish to change.

 

About David Kirk

David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.
View more articles by David Kirk

The Conversation

Follow the reactions below and share your own thoughts.

  • alecks

    i have problem i dont know if this tool will fix it or not
    i have domain on windows 2003 .. users can double log … for example
    Test1 logged on pc1
    and Test1 also logged on pc2
    so 2 ppl use the same user … how can i disable this ?

  • Niklas

    Hier ist eine gute Alternative zu PC time limit. Mit Windows Board eigenen Mitteln!

  • Anonymous

    WinXP does not force the user off no matter how you configure the “net user” command. The only functionality provided by this command is that it prevents users from logging on to the computer outside of the time given. Windows Vista and Windows 7 have parental controls that will in fact boot the user off the computer however there are no warning messages at all!
    You may want to try a product such as Piranha Designs Time Monitor which not only prevents users from logging on when you don’t want them to but also limits the amount of hours they can use the computer.
    The website is http://www.time-monitor.com

  • Anonymous

    well, how to put specific times in would help
    ex: M-T,11-13,15-17 etc
    should military time be 1100-1300 then?

  • Anonymous

    Can’t make it work..
    Any ideas or am I that dumb?

  • P7003

    thats clever

  • Eesa:)

    Jazakallah! a million!

  • Joey

    I have wireless running and have about 3 computers connect to it!.

    I want a way to restrict each computer to a cretain size of data.ANy suggestions?

  • jen

    i did this on my pc for time limit and now it prompts for password which we dont have. any idea how to override this?