Ir al contenido

Windows Local Group Management (net localgroup)

Organization and privilege control in Windows systems through the administration of local security groups via CMD.

0views

Role-based or local group administration is the absolute standard of systems engineering. Instead of assigning individual permissions folder by folder for each user, the professional methodology consists of grouping identities under local Security Groups. In this technical guide, you will learn to manage these groups using the net localgroup command.


The first step before altering the security structure is to audit existing groups and memberships.

Shows all local security groups registered on the machine (including built-in system groups):

Ventana de terminal
net localgroup

Example console output:

Alias para \\NOMBRE-PC
----------------------------------------------------------------
*Administradores
*Duplicadores
*Invitados
*Lectores de registros de eventos
*Operadores de configuración de red
*Operadores de copia de seguridad
*Usuarios
*Usuarios de Escritorio remoto
...
Se ha completado el comando correctamente.

This is one of the most critical security commands for auditing privileges. It allows you to immediately check who has elevated permissions assigned on the machine:

Ventana de terminal
net localgroup Administradores

Example console output:

Alias: Administradores
Comentario: Los administradores tienen acceso completo y sin restricciones al equipo/dominio
Miembros
----------------------------------------------------------------
administrador
usuario.demo
MiUsuarioAdmin
Se ha completado el comando correctamente.

We can create custom groups to organize departmental permissions (for example, Ventas, Marketing, IT, or Contabilidad).

Initialize the local security group in the SAM database:

Ventana de terminal
net localgroup Contabilidad /add

It is of utmost importance to document the purpose of each security container using an explanatory comment:

Ventana de terminal
net localgroup Contabilidad /add /comment:"Usuarios locales autorizados para acceder al servidor de facturas"

The command removes the local security group container, but it does not affect the user accounts that were inside it at all. The identities remain intact; they only lose the privileges associated with said group:

Ventana de terminal
net localgroup Contabilidad /delete

3. Member Administration (Assignment and Degradation of Roles)

Sección titulada «3. Administración de Miembros (Asignación y Degradación de Roles)»

This is the daily operational process for the scaling or reduction of local user permissions.

Add a standard user to a specific group to grant them permissions (including full permissions when adding them to Administradores):

Ventana de terminal
:: Promocionar a un usuario a Administrador Local del Sistema (Control Total)
net localgroup Administradores usuario.ejemplo /add
:: Asociar un usuario a un grupo departamental personalizado
net localgroup Contabilidad usuario.demo /add

Remove a user from the security container to revoke their privileges:

Ventana de terminal
:: Degradar a un usuario quitándolo de Administradores (vuelve a ser usuario estándar)
net localgroup Administradores usuario.ejemplo /delete
:: Quitar a un usuario de un grupo personalizado
net localgroup Contabilidad usuario.demo /delete

  • ✓ Quarterly Audit: Periodically execute net localgroup Administradores to remove orphaned or unauthorized identities.
  • ✓ Principle of Least Privilege: Avoid granting Administradores membership for convenience. It is preferable to create custom groups with controlled access.
  • ✓ Documentation: Always require the /comment parameter in every new group creation for future maintenance audits.