The Windows operating system supports the creation of multiple user accounts, which can be either administrators or regular users or guests. However, after the account is created, it can only be deleted, and the administrator will not be able to disable or block such an account from the user interface of the control panel. Ideally, you should prevent users from creating new local accounts.
An administrator may need to temporarily or permanently block or disable a specific user account, but without completely removing it from the system. To disable or block a user account, follow these steps.
- Go to Control Panel -> System and Security -> Administrative Tools, and then open Computer Management.
You can simply right-click on the “Computer” icon in the “Start” menu and select “Manage”.
- Expand the Local Users and Groups node.
- Click on the Users section.
- Right-click on the user you want to disconnect and select Properties.
- Select and check the option Account is disabled.
- Click OK.
- Now the account is disabled and can not be used to log into the system.
To enable the user, uncheck the box above.
There is an alternative method of disabling a user account using the command line and the “net user” command. To block the “comp root” account, open a command prompt with administrator rights and enter the following command:
net user “comp root” / active: no
Replace comp root with the name of the user you want to disable. Note that the username containing spaces must be enclosed in quotation marks (“).
To activate your account, use the following command:
net user “comp root” / active: yes
You can also delete all unnecessary local accounts through group policy.