Built in parental control in Windows XP – control user login times

Posts in this Series
  1. Built in parental control in Windows XP – control user login times
  2. Free parental control software for Windows, MAC and iPhone

(Besides parental control, you can disable access to selected drives easily or even prevent others from copying your files to a USB storage device.)

From Windows Vista onwards, a parental control has been built into the Operating System by Microsoft. This is not the case with Windows XP though. Although there are many good third party software available for this purpose, here I am going to show you how you can add a simple time restriction for user login under Windows XP. The whole thing is very easy despite the documentation – just skip to the topicOur easy way


Time restriction is the most basic forms of parental control. There is a built in tool in Windows XP for the very same purpose. This is hidden under a command line interface though. Do not get taken back by command prompt, the trick is pretty easy.

Open Command Prompt

First you have to open a command prompt windows while you are logged into an administrator account. Press Windows + R to open the run dialog and then type “cmd“. (You can find out more shortcuts in – Keyboard shortcuts for Windows)

Using net user command

In the next step we will use the “net” command available only under command prompt for our purpose. The “net” command is one of the most powerful commands available on Windows. It lets you administer and automate many tasks in Windows. We will only use the sub-part specific to user account control. Here are some some details about the net user command (ignore this and skip to next section to find out the our easy way):

Net user

Adds or modifies user accounts or displays user account information.

Syntax

net user [UserName [Password | *] [options]] [/domain]

net user [UserName {Password | *} /add [options] [/domain]]

net user [UserName [/delete] [/domain]]

Parameters

UserName : Specifies the name of the user account to add, delete, modify, or view. The name of the user account can have as many as 20 characters.

Password : Assigns or changes a password for the user’s account. Type an asterisk (*) to produce a prompt for the password. The password is not displayed when you type it at the password prompt.

/domain : Performs the operation on the domain controller in the computer’s primary domain.

options : Specifies a command-line option. The following table lists valid command-line options that you can use.

You can read more about the command at Microsoft KB : Full options of net user command.

Using the Command

Do not get frightened by all those options. What we need to do is very simple. Just use

net user USER_NAME PASSWORD /times:Su-Sa,12-13;
net user USER_NAME PASSWORD /times:Su-Sa,3-15;Sa,15-16;

The first option restricts the time the user \”USERNAME\” with PASSWORD can log in from 12PM to 1PM on all days (Sunday through Saturday) (use 24 hour clock in the command its easier to read). The second command restricts the user USERNAME’s login time to 3AM to 3PM on all days and on Saturdays, allocates additional time from 3PM to 6PM.

net user USERNAME */PASSWORD /times in action

In the above screen shot, the command is used to restrict the user “limited” to login only from 1PM to 3PM on all week days. The * will make the command prompt for the users password.

Clear all restrictions

To clear all restrictions just type : net user USER_NAME PASSWORD/*] /times:all

Here is a screen shot of the error produced if the user tries to log in during restricted hours.

Error when a program is tried to run as restricted account

Error shown during restricted hours.

This is a brief summary about the net user commands on Microsoft Knowledge Base :

Other notes

Days can be spelled out or abbreviated. Time can be given in increments of 1 hour. You may enter the time in either 12-hour or 24-hour notation. For 12-hour notation, use am, pm, a.m., or p.m. The time can be specified in increments of 1 hour. If you need to specify multiple times for different days you can use” /time:” option many times. If you give “*” instead of PASSWORD, a password prompt will be shown so as not to reveal the password.

Article on MS Knowledge Base | Shutdown your computer using command prompt

Some related articles you may like :

  1. Globally control and change all users passwords in Windows
  2. Free parental control software for Windows, MAC and iPhone
  3. Batch files to automate tasks in Windows environment – tutorial
  4. Running a command, applying changes and other Windows Techniques
  5. How to shutdown, restart, logoff using command prompt?
  6. CCProxy – control sharing of internet between computers on network
  7. How to change your Windows XP product key
  8. First step to a cleaner and faster Windows – understand the Registry

This entry was posted in Windows and tagged Admin, Command Prompt/Shell, User. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

38 Comments

  1. An Enthusiast
    Posted November 28, 2011 at 12:33 AM | Permalink

    God Bless… How did I never knew… :D

  2. Armani
    Posted September 17, 2011 at 8:09 PM | Permalink

    6am-8am only on fri-sun*

  3. Armani
    Posted September 17, 2011 at 7:59 PM | Permalink

    If I wanted the user to play from 6am-8am (2 hours) how would I format that?

  4. Posted March 22, 2011 at 10:48 PM | Permalink

    Sure why not.. Please use the contact form and send me your mail id. I will get back to you..

  5. Bill Purdom
    Posted March 11, 2011 at 2:50 AM | Permalink

    I’m struggling with this. To show you what I mean I really want to send you a screen shot of the cmd box – is this possible?

  6. Posted December 27, 2010 at 8:41 AM | Permalink

    Hi Jeff,
    sorry for the late reply. When I tried

    8:00-12:00 (use 24 hour format)

    it worked. Please try this and lemme know :)

  7. jeff
    Posted December 15, 2010 at 4:16 PM | Permalink

    hello im trying to do what you are saying above
    but every time i try the system says:

    “invalid range specified days”

    what do i do wrong ?
    im using windows xp home edition

    code line:
    net user USERNAME /time:M-F,8am-8pm

  8. Posted April 30, 2010 at 1:05 AM | Permalink

    Gonna bookmark this, appreciate it man

  9. Posted March 26, 2010 at 9:52 AM | Permalink

    Ron,can you give a link to a page explaining how that is done? I can’t find a good source to read..

  10. Ron
    Posted March 24, 2010 at 1:23 AM | Permalink

    Ajith,

    The Vista parental control can be bypassed via CMD control. How can this be avoided?

    Thanks,

    - Ron

  11. Ron
    Posted March 24, 2010 at 1:22 AM | Permalink

    Ajith,

    I have a question in Window Vista –

    The Vista parental control can be bypassed. How can this be avoided?

    Thanks,

    - Ron

  12. iris gomes da silva alvarenga pereira
    Posted November 23, 2009 at 6:26 AM | Permalink

    gostaria de ter em meu pc o programa da família

  13. Ken
    Posted June 10, 2009 at 5:29 PM | Permalink

    How pathetic the Windows operating system is. Using a command prompt to set parental controls – boy that’s intuitive, easy and convenient – not. This should be an easy to use control panel like on the Mac, not a buried command prompt that nobody can find or use.

  14. Karen
    Posted March 27, 2009 at 5:16 AM | Permalink

    This is a very interesting article. I am also looking for ways to setup an eee pc (XP) for my son. We mostly use Macs and would love to have similar functions that parental control on Mac has. So with time limits, I would love to hear how the PC can automatically log off the user when the time is up. Can’t wait for the development in this thread!

  15. Dhana Angdembey
    Posted March 16, 2009 at 2:20 AM | Permalink

    Thanks for this information.

  16. Posted February 5, 2009 at 11:59 AM | Permalink

    Hi erick..

    When I was on blogger last year I had done a post on scheduled tasks as well as on shutdowns.. but I was not able to repost it here. I will soon repost it…

    Thank you very much for your interest..

  17. erick
    Posted January 18, 2009 at 11:52 PM | Permalink

    Hi, if the user stays logged in past the time set they are not logged out. However, I have a scheduled task for my computer to hibernate at a certain time each day. Check http://www.wcgwiki.org/en/general/hibernate.cfm . For scheduled shutdown instead check http://www.coderetard.com/2008/06/18/automatic-windows-shutdown-with-scheduled-tasks/ . No installs, just simple instructions to make Windows do what you want. I have not looked into making it user specific so it does it for all users on the computer. However, this site controls log ins and the others control logging out.

  18. Posted December 25, 2008 at 5:14 PM | Permalink

    K9webprotection is a hundred times better than the default XP one. But it can only control internet access

  19. Paul
    Posted December 22, 2008 at 9:15 PM | Permalink

    I’m very interested in this question as well. For me, it’s useless unless it will log them off when the time is up. Or, is there any shareware out there that does the same thing?

  20. Posted December 12, 2008 at 8:39 AM | Permalink

    Hi Khew.. I am gonna try that and then tell you the result..

  21. Khew
    Posted December 9, 2008 at 5:43 AM | Permalink

    Hi,
    There was a question about what happens if they are logged on during the allowed hours, but they stay logged on past the ending hour? Will the pc log them off or shut down? what happens?

    Any observations on that?
    Thanks!

  22. Posted October 31, 2008 at 8:33 AM | Permalink

    Thanks Brit… forgot it somehow.. will reply soon

  23. Brit
    Posted October 30, 2008 at 3:37 AM | Permalink

    Anything new with this?

  24. Posted October 21, 2008 at 3:59 PM | Permalink

    Add the user to a non administrative group..

  25. Bruce
    Posted October 20, 2008 at 2:55 AM | Permalink

    What happens if the user figures out they just change the system time to fit into the allowed time schedule?
    I suppose XP home can’t do user level rights to prevent them changing the system time…
    Is this better than the free-for-home-use k9webprotection solutions?

  26. Posted September 20, 2008 at 11:56 PM | Permalink

    Excelent comments. My Favorit Blog. Thank you Autoversicherung

  27. Posted August 21, 2008 at 11:29 PM | Permalink

    OK I think you can do it with task scheduling.. So I will reply by this Sunday.. ;)

  28. Alok
    Posted August 18, 2008 at 8:29 PM | Permalink

    Ajith I will be very happy with the easier option! i.e a continuous slot of 30 minutes starting at a particular time on weekdays (and, if possible, a 45 minute slot at a different starting time on saturdays and sundays.)

  29. Posted August 18, 2008 at 4:52 PM | Permalink

    Alok it is much easier to allow your an account to use net continuously for 30 or 40 minutes. It is very hard to set an account to have internet access for a total of 40 minutes in different slots. I will post about how to do the former.. this week

  30. Alok
    Posted August 18, 2008 at 3:59 PM | Permalink

    Hi Ajith,

    Thanks for the prompt response !

    I am using BSNL’s broadband connection.

  31. Posted August 17, 2008 at 11:22 AM | Permalink

    Hi Alok..

    We can implement this in a different way actually. Please tell me which mode of Internet access you use – using dialup or LAN

  32. Posted August 17, 2008 at 11:21 AM | Permalink

    Hi Mike,
    thanks for your comment…

    I am currently testing the condition you specified.. please wait for a day.. I will reply soon

  33. Alok
    Posted August 17, 2008 at 10:06 AM | Permalink

    I want my kid to use the Internet for not more than 30 to 40 minutes a day.

    Can this command, in some modified form, be used to only restrict the time Internet is used instead of restricting the long-on time of the whole computer. I have windows xp home on my pc.

  34. Mike
    Posted August 15, 2008 at 9:57 PM | Permalink

    What happens if they are logged on during the allowed hours, but they stay logged on past the ending hour? Will the pc log them off or shut down? what happens?

  35. Posted February 7, 2008 at 5:18 PM | Permalink

    Hi Reidsi,
    Answers :
    1, Yes, you can reset the user password using the method mentioned here – http://www.exnol.com/windows/globally-control-and-change-all-users-passwords-in-windows ,

    2, If you have changed the users allowed time and after that the user changes their password, it would not affect the control. The time control will still be enabled.

    I think that would have cleared your doubts. If you have any more doubts please feel free to contact me or comment me.Thank you for you interest

  36. Reidsi
    Posted February 6, 2008 at 9:48 PM | Permalink

    Sound great however:
    1, What happens if you don’t know the password of the user A/C your trying to control. Can you still control the A/C without it?

    2, What happens if you initially know the password, however, the user your trying to control changes their password? Can they now get in?

  37. Posted December 19, 2007 at 11:51 PM | Permalink

    Thanks Saman BTW hows your studies going..You are really into studies now right..

  38. Posted December 18, 2007 at 12:25 AM | Permalink

    This is a great How-To and one that I bet a lot of people have wondered about!

One Trackback

  1. [...] may like to know How to download videos in MP4 fromat from the Youtube. Or read about the Builtin Parental Control in Windows XP [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>