En una terminal CMD, ejecutar los comandos para obtener la información requerida.
1. Listar usuarios.
Comando: net users
Ejemplo: C:\Users\aurlen.admin>net users User accounts for \\WINSERV-2008R2-R0134 ------------------------------------------------------------------------------ Administrator aurlen.admin Guest nagios The command completed successfully. C:\Users\aurlen.admin>
2. Listar grupos locales.
Comando: net localgroup
Ejemplo:
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\aurlen.admin>net localgroup Aliases for \\WINSERV-2008R2-R0134 ------------------------------------------------------------------------------- *Administrators *Backup Operators *Cryptographic Operators *Distributed COM Users *Event Log Readers *Guests *IIS_IUSRS *Network Configuration Operators *Performance Log Users *Performance Monitor Users *Power Users *Remote Desktop Users *Replicator *Users The command completed successfully.
3. Listar los usuarios que pertenecen a un grupo.
Comando: net localgroup groupName
Ejemplo:
C:\Users\aurlen.admin>net localgroup "Remote Desktop users" Alias name Remote Desktop users Comment Members in this group are granted the right to logon remotely Members ------------------------------------------------------------------------------- Administrator aurlen-admin zabbix nagios Linux-admin printer-ilab The command completed successfully.
4. Encontrar a que grupos pertenece un usuario.
Comando: net user userName
Ejemplo:
C:\Users\aurlen.admin>net user aurlen.admin User name aurlen.admin Full Name aurlen.admin Comment User's comment Country code 000 (System Default) Account active Yes Account expires Never Password last set 11/10/2017 7:27:39 PM Password expires Never Password changeable 11/10/2017 7:27:39 PM Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 2/5/2019 10:03:29 AM Logon hours allowed All Local Group Memberships *Administrators *Users Global Group memberships *None The command completed successfully. C:\Users\aurlen.admin>