Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Microsoft > Tips & Tricks

March 15th, 2007, 17:31 GMT · By Dragos Jijau

Restrict Logon Time in Windows XP

SHARE:

Adjust text size:


User Logon Field in Windows
Enlarge picture
One of my friends complained that his child spends way too much time on his computer. He was very worried for his kid's health. He tried to talk with the child but you know how stubborn they are. It was almost impossible to convince a six-year-old kid that spending too many hours in front of the computer can have a bad influence upon his health condition. I am a person who sustains children should learn how to use computers but I am against excessive use.

Regarding my friend's problem, I advised him to try software applications that restrict access to computer for a defined time interval. He was reticent about this idea asking me if there was a costless solution. He didn't want to use software trying to avoid his child getting suspicious. He just wanted a trick to restrict access in Windows without
additional software and at no cost.

I immediately thought that the net user command would be perfect for this issue. Many people are still wondering how come commands are still useful in Windows. You will see one of the benefits of using a command.

What is a "net user" command?

Net user is a command which is used in the command console to do various user account related operations:

- add a new user account
- modify a user account
- display user account information

Syntax:

To add a new account type: net user "account name" /ADD * (do not use the quotes). The asterisk is to prompt you to provide the password for the account.

Using "net user" solitary, with no parameters, you will get the list with all the users on the computer. To delete an account, just use the syntax with /DELETE parameter:

net user TEST /Delete

How to configure logon hours for a user

Now that you are familiarized with the command, it's time to learn how to add parameters in order to limit logon access for a time interval.

Let's suppose the account for which we want to define the time interval access already exists. The command will look like this:

net user "user account" /time:M-F,14:00-16:00

Replace the text between the quotes with the desired account. Using the above command line, the user has rights to access its account between 14 and 17 every day from Monday to Friday. In case your son/daughter comes home from school around two o'clock he/she will be able to logon until 16 o'clock (when you come back from work).

Please notice that only sharp values are accepted. You can choose any hour but not subdivisions like 14:15 or 15:36.

You can even setup time intervals for different days as following:

net user softpedia /time:W,10am-5pm;T,2pm-3pm;F-Sa,9:00-16:00

One more thing, the week days' abbreviations are M, T, W, Th, F, Sa, Su.


It is your choice how you schedule the computer usage time.

Have fun!

TELL US WHAT YOU THINK:

46,895 hits · 6 comments · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Windows "AT" Command

Concealed Windows XP Lock System

Manage/Remove Multi-Boot Option

Disk Management under Windows XP

Reinstall Windows in 10 Minutes!

READER COMMENTS:


Comment #1 by: nestor on 19 May 2008, 16:04 UTC reply to this comment

Hi guys. I've applied this command, but something it's not working.
Now, when I type "net user administrator" in the CMD.... in the logon hours appear:
Sunday 0:00 - 22:00
Monday 7:00 - 22:00
Tuesday 7:00 - 22:00
Wednesday 7:00 - 22:00
Thursday 7:00 - 22:00
Friday 7:00 - Sunday 0:00

All seems to be right, but I can continue login in withou any restrictions.
What I'm doing wrong?

I've applied this rule to the administrator users of some computers because I have some employees that work a lot of time... and I prefer they sleep at night :). So... I thank your help

Comment #1.1 by: Vista_Manic on 10 Jul 2008, 16:49 GMT

Sunday = Su
Monday
Thesday = T
Wednesday = W
Thursday = Th
Friday = F
Saturday = Sa

Start > Run
Type in cmd, click OK or hit enter
type in net user user account /time:Su,0:00-22:00;M,7:00-22:00;W,7:00-22:00;Th,7:00-22:00;F,7:00-22:00;Sa,0:00-22:00;Su,0:00-22:00

Hit enter, it will work.
Message: "The command completed successfully."
type exit in the command prompt
There ya go.


Comment #2 by: Ben on 10 Jul 2008, 07:23 UTC reply to this comment

Sweet tutorial. My sister has been on my bro's PC for at least 16 hours a day. So, I found this and hopefully my sister can get locked down until the time I set it up.

For me, Vista is easy. You use the Parental control feature, set the time restrictions w/ parental controls enabled, and you're good to go. Thanks, Microsoft, and Softpedia.


Comment #3 by: rob on 17 Oct 2009, 01:34 UTC reply to this comment

Thank you for this info works great for anyone who wants to apply these to there computer just did it to a friends to keep the kid off during certian hours


Comment #4 by: Jasn on 08 Feb 2010, 06:28 UTC reply to this comment

If on a temporary basis, is their a way to bypass the restriction, like if the kid is on good-behavior and you wanted to allow them to use it outside the allowed time but ONLY for that one time.......just curious, I notice it prompts for password but the account itself is not setup with a password and the admins account password doesn't work for that users account.


Comment #5 by: Cod3r on 30 Apr 2010, 20:25 UTC reply to this comment

How do i set up logon time in intervals, like 18:30 or 17:25 ???

Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM