-
Notifications
You must be signed in to change notification settings - Fork 18k
os/user: TestGroupIds fails on windows 10 #26041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@gopherbot, please add labels needsinvestigation os-windows |
You need to add a comma I believe. Trying again. @gopherbot add labels needsinvestigation, os-windows |
Is anybody else seeing this problem on Windows 10? The test is new in 1.11; we may need to simply disable it on Windows for now. |
@tobiaskohlbau thank you very much for reporting the failure.
Unfortunately this error message is not very helpful here. Maybe you can see where exactly it fails for you? You could add debugging lines with fmt.Printf to lookup_windows.go file and run test with
I do not see this problem on my computer.
We can disable the test. But would be nice to understand what the problem is. /cc @neolit123 just in case Alex |
I've digged a little bit into this. Looks like it has something to do with my machine being within a AzureAD. I've verified this by using my private machine which uses a Microsoft account and everything works like a charm. My coworker pointed out that azure active directory had caused troubles with other tools before. I will have a more advanced look and try to find and fix the issue by myself. Looks like a perfect situation do contribute back to the go project. |
AzureAD was definitely not tested when the feature was developed as i didn't have the infrastructure for that. please, provide output of what @alexbrainman suggested via some some thanks. |
As far as I found out my AzureAD account isn't registered as a local user account. It's not listed within Local Users and Groups ( If you're able to elaborate this more I'm happy to help and contribute further. Edit: I've created a local Test account and when I hardcore it's name into the code everything works like expected. |
thank you, thinking of possible solutions here. |
i assume that if you pass any idea why is the account not joined the domain? https://github.com/golang/go/blob/master/src/os/user/lookup_windows.go#L141 another question: what are you getting for the |
@neolit123 I already tried that earlier. I also suspected a failure within
As for the GID I get: |
this is very odd and i think something is not right here...not on the Go side. the group called "None", i assume? |
I will try to try this tomorrow on another computer within our environment. Let's see if it is only my maybe bad configured pc. How do I retrieve the GID for the default group? |
just tell me what Gid value you get from the User struct of that user: BTW, i have a possible workaround for this, but i don't want us to implement it. |
@neolit123 I've edited the comment above. Maybe a little bit after you've read it. It contains the GID from my user. |
please run it returns a Group struct with looking at the GID - this should not happen. do you happen to know if someone modified the default group for this AD? |
The integrated test for LookupGroupId as well as my addition are returning:
I've asked the person who is in charge of the AD for any changes group related and will also have a look by myself. Edit: |
type 1 is a SID for a user - i.e. this is so odd. |
I've modified
So I'm using the Version with |
if there is no default group, the default group is called "Domain users" and it's SID should end with ref: the default group is there for Unix compatibility only and should not be changed. so our code for please, mind that i'm not an AD expert.
that would be a good confirmation too. thank you. |
I don't have any specific knowledge on AD neither. As my coworker suggested that Azure AD does not have the same feature set of a normal AD I found this:
As I didn't find any SID related settings within the settings of Azure AD maybe the Windows 10 experience together with hosted AD screws something over? |
i did test this on my corporate laptop which runs Windows 10 and is part of a corporate domain network. at the same time that user SID being returned instead of a group SID seems like a plain bug to me. what user name do you get if you create the User struct via: |
I've tried to compile the latest tip on another computer at work today. This computer was connected to the same AzureAD but with a different user. At this machine the tests succeeded and no error was thrown. As I'm quit new at this company maybe my account is missing some information or I've screwed up something on my and. If I find some time on the weekend I will try to find/solve the issue on my pc and will report back what caused the trouble. For now I will close this issue as it looks like the error is on my end. |
What version of Go are you using (
go version
)?TIP
Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\TobiasKohlbau\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\TOBIAS~1\AppData\Local\Temp\go-build684014806=/tmp/go-build -gno-record-gcc-switches
What did you do?
Build latest master from source.
What did you expect to see?
Test succeed.
What did you see instead?
The text was updated successfully, but these errors were encountered: