Explain the use of the Net User command in detail.

  

To use your own simple operating system, you can't ignore the use of commands. There are various commands in the system. The Net User command is one of them, but his alternative. Usage is rarely known. The Net User command is a DOS command that must be run in MS-DOS mode under windows xp, so first enter MS-DOS mode: select the "Start" "Accessories" option sub-option“ At the prompt, enter ““cmd.exe” in the “Run” option in the “Start” menu to enter MS-DOS mode. The following features are based on this mode.

Create a normal new user

Enter the following command at the MS-DOS prompt: <;net user john 123 /add”, enter. You can create a new user named “John” with a password of “123”. The Add parameter indicates a new user.

It is worth noting that the username can have up to 20 characters and the password can have up to 127 characters.

Establishing a user with limited login time

Use the following methods to control the computer's usage time. For example, you need to create a John user account with the password "“123", login privileges from 8:00 am to 10:00 pm Monday to Friday and 7:00 pm to 9:00 pm on weekends.

1. For the 12-hour system, type the following command: <;net user john 123 /add /times:monday-friday,8AM-10PM;saturday-sunday,7PM-9PM”, enter OK.

2. For the 24-hour system, type the following command: <;net user john 123 /add /times:MF,8:00-22:00; Sa-Su,19:00-21:00”, Enter to confirm.

It is worth noting that the increase in Time is limited to 1 hour. For the Day value, the full name or abbreviation (ie, M, T, W, Th, F, Sa, Su) can be used. A 12 hour or 24 hour time representation can be used. For the 12 hour representation, please use AM, PM or A.M., P.M. The All value means that the user can always log in; a null value (blank) means that the user can never log in. Separate the date and time with a comma and separate the date and time units with a semicolon (for example, M, 4AM-5PM; T, 1PM-3PM). Do not use spaces when specifying time.

In addition, the Passwordchg:{yesno} parameter can be used to specify whether the user can change their own password. The default setting is Yes.

Limiting user usage time

The Net User command can also use the parameter Expires:{{mm/dd/yyyy dd/mm/yyyy mmm,dd,yyyy} never} to make the user account based on The specified Date expires to qualify the user. The expiration date can be in the format [mm/dd/yyyy], [dd/mm/yyyy] or [mmm, dd, yyyy]. It depends on the country code. The user account expires at the beginning of the specified date. For month values, a number, full or three-letter abbreviation (ie, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec) can be used. For year values, you can use two or four digits; separate each part of the date with a comma and a slash; do not use spaces.

Copyright © Windows knowledge All Rights Reserved