List Info

Thread: Directory Server/Domain discovery




Directory Server/Domain discovery
user name
2008-07-09 18:34:21
I am looking for a way to get information about the
domain/directory server
that the current user is logged in under.  I need more than
the short name.
 I need the long name and/or the server's name/address.
The problem I am trying to overcome is two domains on the
same network with
the same short name (yes I know, can't change it, customer's
network).

I have the server name/address of one of the domain
directory servers and I
need to determine if the user is logged into that one or a
different one.

Any ideas?

Thanks,
-Mont

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


Re: Directory Server/Domain discovery
user name
2008-07-10 08:42:38
Hi Mont,

does binding to LDAP://rootDSE <ldap://rootDSE/> do
what you want?

I don't have 2 domains to test it on, but this seems to
suggest it might
work:
http
://msdn.microsoft.com/en-us/library/ms677945(VS.85).aspx


"In this case, a default domain controller from the
domain that the security
context of the calling thread is in will be used. If a
domain controller
cannot be accessed within the site, the first domain
controller that can be
found will be used"

the defaultNamingContext should tell you the domain
distinguished name (what
I think you mean by long name) and the serverName property
should give you
the name of the server
HTH
James
On Thu, Jul 10, 2008 at 12:34 AM, Mont Rothstein
<mont.rothsteingmail.com>
wrote:

> I am looking for a way to get information about the
domain/directory server
> that the current user is logged in under.  I need more
than the short name.
>  I need the long name and/or the server's
name/address.
> The problem I am trying to overcome is two domains on
the same network with
> the same short name (yes I know, can't change it,
customer's network).
>
> I have the server name/address of one of the domain
directory servers and I
> need to determine if the user is logged into that one
or a different one.
>
> Any ideas?
>
> Thanks,
> -Mont
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


Re: Directory Server/Domain discovery
user name
2008-07-10 12:55:38
Thanks guys.  Those are some great suggestions and pointers.
 I am going to
try them out as soon as I can.
James, yes when I said long name I mean distinguished name. 
I guess I was
still in non-IT communication mode when I wrote that.

Thanks,
-Mont

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )