Subscribe to Windows IT Pro
December 27, 2005 12:00 AM

Finding the Logged-on User's Groups

Windows IT Pro
InstantDoc ID #48515
Rating: (6)

When testing security settings, I sometimes want a quick way to get a report listing the groups to which the user I'm currently logged on as belongs. Can I get such a report?

Yes, you can use the Whoami command with the /groups option to get a report like the one in Figure 1. As you can see, the sample report shows that the user is a member of Administrators and Users and has the following special security principal SIDs in his or her access token: Local, Authenticated Users, Interactive, NTLM Authentication, Remote Interactive Logon, and This Organization.

One caveat: If you lock a workstation, go home, and then log back on to the system remotely through Terminal Services, you won't see the REMOTE INTERACTIVE LOGON special SID. The original logon wasn't remote, so the access token isn't rebuilt.

Related Content:

ARTICLE TOOLS

Comments
  • Scott
    7 years ago
    Dec 31, 2005

    I must be missing something here...I can't get "whoami" to work on my xp box. I recall using it on 2K but it doesn't seem to work on xp.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.