How to manage users in Windows using Net User in the console

When we manage Windows users, whether they are administrators or normal users with fewer permissions, we usually create, modify and delete them directly from ” Control Panel / Users “, although we can also do it from ” Settings / Accounts “. However, we have a really interesting command, the ” Net User ” command, which will allow us to manage the users of the Windows operating system through the console with the command prompt. Today in this article we are going to explain the operation of this program that comes pre-installed in the operating system.

What is Net User and what is it used for?

How to manage users in Windows using Net User in the console

Net User is a console application that allows you to quickly and easily manage existing users in an operating system, all through console commands. It is a tool that is intended to meet the needs of system administrators, who usually access the operating system through SSH and execute different commands on the console. The main purpose of this tool is none other than to activate the administrator accounts that remain inactive in the system, deactivate them and manage the different users that we have registered on the computer.

The use of this program is quite simple, for all those users who do not handle themselves too well with terminals in both Windows and Linux, they will see that using Net User is a very intuitive program and it will be a good opportunity to start in the world of computers. commands. The only requirement to be able to execute this command is to launch the console (CMD) or command prompt with administrator permissions, therefore, we will have to click on the ” Start / Windows ” icon, put ” CMD ” and right click on it. Command prompt and choose ” Run as administrator “, otherwise we will not be able to execute the different commands that we have available.

Once we have opened a command prompt or console session, we are going to see all the options that we have available and we will give you some examples of the use of this program.

How the Net User Tool works

The operation of this command is really simple, especially to display information, if we want to modify information then we will have to put somewhat more complicated commands. If we execute the command ” net user ” without any argument, we will be able to see the name of the computer and also which users we currently have registered in our operating system.

In the screenshot above you can see the list of users that we have in the operating system, currently we have the user “Administrator” and “Guest” that come by default with the installation of the Windows operating system. We also have the username “Bron” who is the system administrator, and the one who is currently executing the different commands as the system administrator.

There is a list of arguments that we can use to see more information about one or more user accounts, in addition, we can set a password, activate the user account, deactivate it, and we can even delete the user completely.

  • Net User username : This statement returns all the information associated with the username that was provided. In other words, the configuration of all the parameters associated with the account can be viewed.

  • Net User nombreUsuario password : associates the indicated password with the user name provided, this allows you to change the password with that specific user.
  • Net User username / active: yes | no – Allows you to enable or disable the user’s account. That is, allow that account to login to the system or not even if the password is entered correctly.
  • Net User username password / add : create a new user in the system, enter the new username and password that we want that user to have in particular. It is very similar to the one mentioned above, with the only difference that the previous one only serves to associate a password to an existing user in the operating system, this command is used to create a new user.
  • Net User username / delete : deletes the user and everything related to it in terms of configuration. The changes are not reversible.

If we write the command « net user / help » we will be able to launch the help of net user with each and every one of the available commands, in addition, we will also see a legend of what each of the commands that we have available with this program does, for Therefore, we will not have too many problems to use this program, in addition, we have different examples that we can run to test what each one of them does.

A very interesting function is that it also allows us to configure these users directly on a domain controller of the current domain, as long as we are administrators of the domain controller itself. Other interesting options that net user allows us are the following:

  • / COMMENT: allows adding a comment to the user account that we are going to create.
  • / COUNTRYCODE: Add the country or region code of the operating system to use the language files.
  • / EXPIRES: allows you to configure when a certain account that we are going to add or modify expires, if we do not indicate anything it will never expire.
  • / FULLNAME: this option allows us to define the full name of the user, and not just the login user name.
  • / HOMEDIR: allows you to configure the path of the user’s home directory.
  • / PASSWORDCHG: allows you to configure whether users are allowed to change their own access password.
  • / PASSWORDREQ: allows you to configure that users always have an access password.
  • / LOGONPASSWORDCHG: forces the password change of the user in question at the next login.
  • / PROFILEPATH – Sets the path for the user’s login profile.
  • / SCRIPTPATH: location of the login script for the user in question.
  • / TIMES: hours in which a certain user can log in.
  • / USERCOMMENT: allows you to add or change a user’s comment for the account.
  • / WORKSTATIONS – Shows up to 8 computers on the network from which a user can log in.

As you have seen, this command is really useful to manage the operating system users, we can create, modify, delete them, and also configure their passwords, password policies, if the account can expire, the root directory of a certain user and many other parameters to correctly manage all users of the operating system using net user for Windows.