Hi Corinna

On Tuesday, August 16, 2016 05:12, "Corinna Vinschen" 
<corinna-cyg...@cygwin.com> said:

> Hi Russell,
> 
> This is as bad as I feared.  Apart from the username and the Windows
> home dir, there are no other information which could be fetched by
> the usual means.  Quite apart from the fact that there are no means to
> *store* this information somewhere, other than creating an explicit
> /etc/passwd and matching /etc/group entry.
> 
> But, anyway, I prepared some code for the Cygwin DLL to handle these
> accounts even if no /etc/passwd and /etc/group entries are present.  It
> still needs some work, though, and for that I'd ask you to perform a
> last test.
> 
> I attached a short testcase.  We know that LookupAccountSid from the
> user SID in the user token returns a name (RussellMora) and a domain
> (AzureAD).  However, the open question is if the reverse operation
> LookupAccountName works as desired when feeding it the domain name
> and the user name.  Actually, for completeness the testcase tries it
> two ways:  Once only with the username, once with dom\username.
> 
> The reason for testing this is, if the reverse lookup works with only
> the name we *could* go ahead and omit the domain from the Cygwin
> username.  I'm not yet sure if that's feasible, but it's certainly worth
> a try.
> 

Both seem to work. I guess what you are proposing makes sense - the AzureAD 
domain is like a single domain with multiple tenants (yeah, I don't really know 
what I'm talking about with respect to AD....). Anyway, let me know if you want 
me to do any more testing, I'm still very willing to be a Guinea Pig (squeek 
squeek) - thanks for figuring this out for me!

Unknown+User@Lenovo-PC /cygdrive/c/cygwin64
$ gcc -W azure-check5.c -l Netapi32 -o azure-check5

Unknown+User@Lenovo-PC /cygdrive/c/cygwin64
$ ./azure-check5
Sid: S-1-12-1-2043906341-1249388050-2635137163-399631282
Dom\Name: AzureAD\RussellMora
Reverse Sid (RussellMora): S-1-12-1-2043906341-1249388050-2635137163-399631282
Reverse Sid (AzureAD\RussellMora): 
S-1-12-1-2043906341-1249388050-2635137163-399631282

Unknown+User@Lenovo-PC /cygdrive/c/cygwin64
$

HTH

Cheers,
Russell.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to