NET user command

Source: Internet
Author: User

NET user <username> [password or *] [/add] [options] [/domain]
NET user <username]/delete/domain
  

Username account Name
Password assigning or changing passwords
* Password hint
/domain executing in a domain
/ADD Create an account
/delete Delete an account
/active:[yes or no] activates or stops an account
/comment: "<text>" added descriptive notes
/COUNTERYCODE.NNN nnn is the system code. 0 is the system default value

*/expires:<date or never> account expiration time. Format: Month, day, year or day, month, year (format determined by country code)

/fullname: "<name>" account full name//net user licht/fullname: "Leisurelicht"

/homedir:<path> User Home directory path
/passwordchg:[yes or No] set whether the user can change the password
/passwordreq:[yes or No] set whether the user requires a password
/profilepath:<path> Setting the Environment file path
/scriptpath:<path> Logon Script path
/times:<times or all> number of hours a user can log on
/usercomment: "<text>" account description information//net user licht/usercomment: "Hikal

/workstations:<machine names> The user name that is allowed to log on. * indicates all users.

 

Note that there is a space between the net user * * */parameter and "/".

  

NET HELP user//List all usage methods of net user

The use of the net user command

1> create a normal new user

Enter the following command at the MS-DOS prompt: "NET user John 123/add", carriage return. You can create a new user named "John" with a password of "123". The add parameter represents the new user.

Note : The user name can be up to 20 characters and the password can be up to 127 characters.

  

2> setting up a user with limited logon time

The following methods can be used to control the computer use time. For example, you need to create a John user account with a password of "123" and a login right from Monday to Friday, from eight a.m. to 10 o'clock in the morning and from seven o'clock to nine o'clock at night on weekends.

1.12-hour system you can type the following command: "NET user John 123/add/times:monday-friday,8am-10pm;saturday-sunday,7pm-9pm", enter OK.

2.24-hour system you can type the following command: "NET user John 123/add/times:m-f,8:00-22:00; Sa-su,19:00-21:00 ", enter OK.

Note: The increment value for time is limited to 1 hours. For day values, you can use a full name or abbreviation (that is, M, T, W, Th, F, Sa, Su). The 12-hour or 24-hour notation can be used. For 12-hour notation, please use AM, PM, or a.m., P.M.. The all value indicates that the user is always able to log on, and a null value (blank) means that the user can never log on. Separate the date and time with commas, separating the date and time units with semicolons (for example, m,4am-5pm; T,1PM-3PM). Do not use spaces when specifying a time.

In addition, the Passwordchg:{yes | no} parameter can be used to specify whether the user can change their own password, which is set to Yes by default. <BR> limit the user's use time

3> limit the user's usage time
The Net user command can also use the parameter expires:{{mm/dd/yyyy | dd/mm/yyyy |mmm,dd, YYYY} | never} to restrict users by the specified date expiration. Expiration date can be

In [mm/dd/yyyy], [dd/mm/yyyy], or [mmm,dd,yyyy] format. It depends on the country (region) code. The user account expires at the beginning of the specified date. For month values, you can use a number, full name, or three-letter abbreviation (that is, Jan, Feb, Mar, APR, May, June, Jul, April, Sep, Oct, Nov, Dec). For year values, you can use either two-digit or four-digit numbers, separate the parts of the date with commas and slashes, and do not use spaces.

For example: To limit the user account in China Licht expires August 9, 2015, you can type the following command: "NET user licht/expires:2015/08/09", enter OK.

  

4> viewing user information, modifying existing user passwords, and deleting users

If used without parameters, net user displays a list of users on the computer, such as type the following command: "NET user", and enter to display all users of the system.

If you type: "NET user John", a carriage return displays information about the user John.
If you type the command: "NET user John 123456/add" and enter OK, force the password for the user John (John) to be 123456 for the existing user.

"Net localgroup Administrators John/add" puts the user John's permission as a system administrator (adding it to the Administrators user group)

If you type the command: "NET user John/delete", enter OK to delete the user John

NET user command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.