List users like this:
net users
Query the /etc/passwd file directly:
cat /etc/passwd
Or use getent:
getent passwd
Grep for a certain user:
cat /etc/passwd | grep username getent passwd | grep username
List groups:
net localgroup
simple command:
groups
See entire group list:
cut -d: -f1 /etc/group | sort
Last updated 5 years ago