Skip to content

os/user: Lookup() method returns incorrect user type when NT4 users are migrated to Active Directory #65276

@satya-prasad-chellu

Description

@satya-prasad-chellu

Go version

go version go1.20 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=off
set GOARCH=amd64
set GOBIN=
set GOCACHE=****
set GOENV=****
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=****
set GONOPROXY=https://github.com/golang/go.git
set GONOSUMDB=https://github.com/golang/go.git
set GOOS=windows
set GOPATH=****
set GOPRIVATE=https://github.com/golang/go.git
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=****
set GOVCS=
set GOVERSION=go1.20
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=****

What did you do?

When users from deprecated NT4 Domain controller are migrated to the new Active Directory, the method Lookup from os/user used to identify the type of user returns incorrect type.

What did you see happen?

The returned type of user is SidTypeGroup

What did you expect to see?

The expected type is SidTypeDomain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Windows

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions