Monday, April 24, 2006

XP Logon Limits

Problem: Your kids get up in the middle of the night and use the computer, and you need a way to stop them, short of handcuffing them.

Solution: Go to the XP command line and enter the following:

net user littlejohnny /TIMES:m,6am-11pm;t,6am-11pm;w,6am-11pm;th,6am-11pm;f,6am-11pm;sa,6am-11pm;su,6am-11pm

Here's a breakdown of the command:
  • net user is the command
  • littlejohnny is your kid's userid
  • /TIMES: is the option to set the logon times
  • m is Monday (the rest of the days are abbreviated t, w, th, f, sa, su. They can also be spelled out)
  • the times can also be specified other ways, but the syntax is very particular. This way works

You can look at the results of the command by issuing: net user littlejohnny

So anyhow, these are the times that littlejohnny is allowed to logon. Of course the times can be different on every day if you want.

Here are 2 things to note:

  • These times only control the LOGON. If littlejohnny is already logged on when the restricted time goes by, the machine will not kick him off. You have to do that. Then he won't be able to logon again until the unrestricted time.
  • Make sure all the other userids on your machine are password protected. Littlejohnny might be little, but he's not stupid.