Manage Windows 7 users from the command line. Launch of administrative tools from CMD

Long ago passed those times when windows installation We had to use the boot diskette. If it were not for experiments with reinstalling Windows (I remember the delight from installing Millenium instead of 98) and the frequent use of CMD and its utilities, then the desire to learn something more, something that lies beyond the edge, would have rushed into oblivion.

As a rule, at that time the main functionality (I also remember the book on computer science bought) was the use of standard utilities, such as other times, and perhaps even the middle class schoolboy will be able to easily overtake teachers in computer science, if the teacher has no Internet, and The schoolboy has, plus, there is a huge desire to know something new. To the great regret, often you have to see these schoolchildren on TV, in the news with a loud name "Schoolchildren stole 5,000 dollars with electronic wallets" or something like that.

Perhaps every users personal computer With the Windows operating system, at least once created an account, or saw how it was done. And, perhaps, many are proud that they have account With administrator rights, well, if they also put a password ... then, perhaps, feel the king. If, when using the control panel, everything is quite simple - created a new unit, made a choice of the "administrator" type, installed the password and everything, you can easily go to bed. However, if you try to do the same thing, that is,, then there will be many unexpected and interesting moments. And so, in order to add or delete the user from command lineThe command is used net.usewhich is used in conjunction with such parameters:

Net User Newuser New Pass / Active: No / Add

It will not be displayed during system boot and even in the "User Accounts" applete.

If you run the Net User command without parameters, you can see that besides the user, the creation of which was made from the command line, there is, and ... accounting the recording administrator and guest. Unfortunately, this team does not show what is activated, and which is not. It is worth remembering that the built-in system accounting_caps of the administrator and the guest cannot be deleted by the team net.user. Administrator / delete.. You can only turn off:

Net User Guest / Active: No Net User Administrator / Active: NO



It is worth remembering that these accounts may have other names (Administrator, Admin ...). And now the most interesting thing, if you are a happy owner of XP, well, for example SP3 (I suppose it also depends on the assembly), then when installing the operating system, the registration_apission "Administrator" remains on, more, it is not displayed when logging in. On the Internet there is a video under the loud name "We go around the administrator password", so here, when entering the system (when the welcome window appears) it was enough to introduce a combination Ctrl + Alt + Del (twice), in the window that appears, enter Administrator and ENTER, you will be in the system and also with the administrator rights! It is clear that if the account does not have a password, and active, then nothing bothers to get into the middle. For curious, you can open the control panel / administration / computer management and similarly to see which accounts are and what are active. But, if you are a happy seven winner, then the trick with Ctrl + Alt + Del will no longer pass, as the administrator is disabled.

But, creating a user from the command line Through the Net User utility, it will automatically enroll in the group of users that is not good, especially if we want to create our dark divids under this account.

And so, the next team net.localgroup. Allows you to view the group available in the system and add a new user from CMD (command line) to one or another group. Following similar actionsWe will see that the groups are not two as expected (administrators and guests), but much more.

Okay, add newuser to the Administrators group:

It is worth paying attention to the seven, there is sometimes a very annoying UAC mechanism - accounting of accounts. When you try to install something or change in the system, it offers the option to allow or not. Sometimes this mechanism does not allow you to install the game or software package (it is necessary to remember that some work only in the event that the user is creating from the command line if you run it on the name of the administrator), in this case, you can try to activate the administrator's built-in system recording and already Under it, make the necessary actions. BUT!!! After, it is necessary to disable it or again, or put a password, away from sin.

Net User - User Account Management

Command Net User. intended for add, edit or view User accounts on computers. When executing a command at the command prompt without parameters, a list of Windows user accounts are displayed on the computer (this command also works well in Windows 10). User account information is stored in the Windows database.

Net User command syntax

net User [username [Password | *] [parameters]]

net User username (password | *) / Add [Parameters]

net User username , where

  • username - Specifies the name of the user's account, which you can add, delete, edit or view. The name may have a length of up to 20 characters.
  • password - assigns or changing the user password. Enter the asterisk (*) to output invitations to enter the password. When entering the keyboard, the password characters are not displayed on the screen.
  • / Domain. - Performs an operation on the main controller for this computer domain.
  • parameters - Specifies the command line parameter for the command.
  • / Delete -Delete a user account.

Additional parameters of the Net User command

  • / Active: (YES | NO) -Activates or deactivates account. If the account is not activated, the user cannot access the server. By default, the account is activated.
  • / Comment: "Text" -Allows you to add a description of the user account (maximum 48 characters). The description text is quoted.
  • / Countrycode: NNN -Uses the country code specified for the operating system, to implement the relevant linguistic files when the user references and error messages are displayed. The value of 0 corresponds to the country code used by default.
  • / EXPIRES: (Date | Never) -Date of the expiration date of the account. The NEVER value corresponds to an unlimited period. The date is indicated in mm / DD / GG or DD / MM / GG, depending on the country's code. A month can be indicated by numbers, completely or in abbreviated form (three letters). The year may indicate two four digits. Date elements are separated by slash (/) without spaces.
  • / FullName: "Name" -The full name of the user (in contrast to the user's account name). The name is indicated in quotes.
  • / Homedir: Path -Specifies the path to the user's home directory. The specified place must exist.
  • / Passwordchg: (YES | NO) -Specifies whether the user can change its password (by default).
  • / Passwordreq: (Yes | No) -Specifies whether the user account should have a password (must be default).
  • / PROFILEPATH [: Path] -Specifies the path to the user login profile.
  • / scriptpath: path -The path to the script used by the user to log in.
  • / Times: (Time | All) -Time to log in. The time parameter is indicated in the format of the day [-Den] [, day [-Den]], an hour [-th] [, hour [-hour]], and an increment equals 1 hour. The name of the week days may be indicated in whole or in abbreviated form. The clock may be indicated in the 12th or 24-hour representation. For a 12-hour view, the designations are AM, PM, A.M. or p.m. All value corresponds to the lack of restrictions on the login time, and the empty value indicates a complete ban on the login. The values \u200b\u200bof the days of the week and time are separated by the comma; Several records for the days of the week and time values \u200b\u200bare separated by a comma point.
  • / Usercomment: "Text" -Allows the administrator to add or change the comment to the account.
  • / Workstations: (_name_name [, ...] | *) -Allows you to specify up to 8 computers from which the user can enter the network. If the / WorkSTATIONS parameter does not specify a list of computers or the value is *, the user can enter the network from any computer.

Net User Team Examples

  • To display the list of all users of this computer, the command serves: net user;
  • To display information about the user "PETR" is the following command: net User Petr;
  • To add a PETR user account with the full name of the user and the right to connect from 8 to 17 hours from Monday to Friday, the following command is used: net User Petr / Add / Times: Mon-Fri, 08: 00-17: 00 / FullName: "Petr".
  • To delete an account, you must enter the command: net User Petr / Delete;
  • For disconnection account must be entered the command: net User Petr / Active: NO.

Video - Working with Net Used Utility

Consider two simple way Providing an account of the local administrator rights.

After you have created an account on windows server Server, often the question arises, how to add a user to a group of local administrators?

In this article we will show how to add a user to local admins on the example of the operating system Windows Server 2012 R2. All information is applicable to any other supported Windows operating systems. Naturally, to perform these operations, an account that performs these changes must have administrative powers.

Adding to the Administrators Group with Computer Management Console

Adding a user to administrators using the Net User command

Enter the operating room windows system Under a record with administrator rights and launch a command line with elevated privileges.

In order to display a list of all local user accounts in the system, enter the command

As you can see, the system has 6 accounts.

To add a root user account to a local administrators group, run the following command and press ENTER:

net Localgroup Administrators root / Add

In Russian windows version local group Administrators are called differently, so if the previous command returned the error "This Local Group does not exist", use the other command:

nET LocalGroup "Administrators" Root / Add

If you need to add a user account to the system administrators domain Active Directory, the team format will be like this:

net Localgroup Administrators YourDomain \\ root / Add

Check the composition of the group of local administrators can be using the command:

Net Localgroup Administrators.

As you can see, the ROOT user account is now a server administrator.