Pcornel
Windows

Users & Groups

Cheat sheet · https://pcornel.dk/topic.php?topic=2978

Back to the Topic

Answer

Users & Groups explains the Windows security-principal model behind sign-in and access decisions. A user account has an identity such as a SID; group membership expands the SIDs and privileges carried in an access token; a user profile stores per-user state but is not the account itself.

Remember

  • Windows authorizes security principals by SID, not by the display name alone.
  • Local and domain accounts can have the same username while remaining completely different principals.
  • Group membership affects the access token; changing membership may require a new sign-in or new token before a running process sees the change.
  • A user profile is per-user runtime/configuration state and can fail independently of the account.
  • Administrator-group membership does not mean every process is elevated; UAC is a separate boundary.

First checks

  • Get-LocalUser — local accounts
  • Get-LocalGroupMember Administrators — local admins
  • whoami /all — current user, SID, groups, privileges
  • net user <user> /domain — domain account details

Commands

net user
Displays or manages Windows user accounts. With no username it lists local accounts; with a username it displays accoun…
net localgroup
Displays or manages local Windows groups and their membership. It is useful for proving configured local group membersh…

Verify in this order

account (local SAM or AD) → authentication → token with SIDs → access

Where it usually breaks

First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.

Windows identity boundary map

ItemMeaningBoundary
Local accountLocal machine SAM / local account databasemachine-scoped SID; usable without domain connectivity
Microsoft accountCloud identity linked to Windows sign-inWindows creates/uses a local security context and profile for the sign-in
Domain accountActive Directory domaindomain SID plus RID; domain authentication/policy applies
GroupCollection of security principalsgroup SID can be present in token and grant/deny access
User profilePer-user files and registry statenot the identity itself; can be corrupt while the account is valid

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2978

Confirmation

Confirm action

Continue?