logon

command
v0.0.0-...-e92761b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 7 Imported by: 0

README

LogonUser

This example program that validates the user's credentials and displays the account information using the LogonUserW API.

When you run the program, it will prompt for a Username and Password. If the password validates correctly, it will use your access token to look up your account and user groups and print them as JSON.

> logon.exe
Username: Justen
Password: ******
Checking Password
Welcome, Justen
{
  "sid": "S-1-5-21-0001112223-102030201-1029384756-1001",
  "name": "Justen",
  "domain": "COMPUTER",
  "type": "User",
  "groups": [
    {
      "sid": "S-1-16-12288",
      "name": "High Mandatory Level",
      "domain": "Mandatory Label",
      "type": "Label"
    },
    {
      "sid": "S-1-1-0",
      "name": "Everyone",
      "type": "WellKnownGroup"
    },
    {
      "sid": "S-1-5-114",
      "name": "Local account and member of Administrators group",
      "domain": "NT AUTHORITY",
      "type": "WellKnownGroup"
    },
    ...
  ]
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL