Net localgroup command details (add users to the Administrator group, etc)

Source: Internet
Author: User

CopyCode The Code is as follows: Net user/Add ABC *************/comment: "description of this user"/expires: Never
Net localgroup/Add administrators ABC add ABC to the administrators User Group

Net localgroup

[Groupname [/comment: "text"] [/domain]
Groupname {/Add [/comment: "text"] |/delete} [/domain]
Groupname name [...] {/Add |/delete} [/domain]
Net localgroup is used to modify the Local Group on the computer. When you use this command without the option, it will
Displays the Local Group on the computer.
Groupname refers to the name of the Local Group to be added, expanded, or deleted. You only need to enter the group name.
You can browse the user or global group list in the Local Group.
/Comment: "text" adds comments to a new or existing group. Text must be enclosed in quotation marks.
/Domain performs operations on the master domain controller of the current domain. Otherwise, execute
.
Name [...] lists one or more user names that need to be added or deleted from a local group or
Group name. Multiple user names can be separated by spaces. The name can be a user.
Or global group, but it cannot be another local group. If a user comes from another
A domain name (such as sales \ ralphr) must be added before the user name ).
/Add add a group name or user name to a local group. Must be used
This command adds a user to the local group or creates an account globally.
/Delete deletes a group name or user name from a local group.

Net user
[Username [Password | *] [Options] [/domain]
Username {password | *}/Add [Options] [/domain]
Username [/delete] [/domain]

. Net user is used to create and modify user accounts on the computer. When you use this command without the option,
It lists the user accounts on the computer. The user account information is stored in the user account database.
This command is only run on the server.

Username refers to the name of the user account to be added, deleted, modified, or browsed. The user account name cannot exceed 20 characters.
Password to allocate or change the password of the user account. The password must meet the requirements of the Net accounts command
The/minpwlen option specifies the minimum length. It can contain up to 14 characters.
* The system prompts you to enter the password. The password is not displayed when you enter it at the password prompt.
/Domain performs operations on the master domain controller of the current domain.
/Add: add the user account to the user account database.
/Delete: delete a user account from the user account database.

Options:
Options description
--------------------------------------------------------------------
/Active: {Yes | no} activates or disables an account. If the account is disabled
You cannot access the server. The default value of this option is yes.
/Comment: "text" provides a descriptive comment about the user account. Text must be enclosed in quotation marks
/Countrycode: NNN uses the country/region code of the operating system to implement user help.
And the specific language file of the error message. 0 indicates the default country/location
Code.
/Expires: {date | never} if the date is set, the account will expire. Set never,
There is no time limit on the account. According to the country/region code
Different, the valid date format can be month/day/year or day/month/year.
A month can be a number, spelling complete or abbreviation of three letters.
The year can be two or four digits. Use a slash (/) (no space)
To separate the parts of a date.
/Fullname: "name" is the complete name (not the user name) of a user ). Name
Enclosed in quotation marks.
/Homedir: pathname specifies the path of the user's home directory. The path must already exist.
/Passwordchg: {Yes | no} specifies whether the user can change his/her password. The default value is yes.
/Passwordreq: {Yes | no} specifies whether the user's account must have a password. The default value is yes.
/Profilepath [: path] sets the path for the user's logon configuration file.
/Scriptpath: pathname indicates the location of the user's logon file.
/Times: {times | all} indicates the time when the user can log on. The expression of times is
Day [-day] [, day [-day], time [-time] [, time [-time],
The increment is limited to 1 hour. Days can be all spelling or abbreviations. Hours
It can be 12 hours or 24 hours. For the 12-hour system
To use am and PM. All indicates that the user can always log on. Null table
Indicates that the user cannot log on. You can use commas to separate days and time items,
Separate multiple days and time items with semicolons.
/Usercomment: "text" allows the Administrator to add or change the account user comments.
/Workstations: {computername [,...] | *}
List up to 8 users can log on to computers on the network.
If/workstations does not have a list or the list is *,
You can log on to any computer.

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.