I am getting SID of my system using WMI

>wmic useraccount where name='vijay' get sid
SID
S-1-5-21-742204146-2006990925-2362806598-1001

But still i am not able to get sid structure .

package main

import (
    "fmt"
"golang.org/x/sys/windows"
)

func main() {

sid , domain, accType , err := windows.LookupSID("VTHLPT022","vijay")
fmt.Println("sid:",sid)
fmt.Println("domain:",domain)
fmt.Println("accType:",accType)
fmt.Println("err",err)

sids, er:= 
windows.StringToSid("S-1-5-21-742204146-2006990925-2362806598-1001")
fmt.Println("er",er)
fmt.Println("sids : ",sids)
}

output:
sid: &{}
domain: VTHLPT022
accType: 1
err <nil>
er <nil>
sids :  &{}




-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to