Internet

Manage Windows users by console with Net User

What is Net User and what is it used for?

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 «iconStart / Windows«, We put«CMD»And right click on the command prompt and choose«Execute as an 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 team and also which users we have currently 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 username 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 activate or deactivate the user 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 him in terms of configuration. The changes are not reversible.

If we write the command «net user / help»We will be able to launch the net user help 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, 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 – Displays 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.

Related Articles

Leave a Reply

Your email address will not be published.