Page 2 of 2 <12
Topic Options
#138426 - 2005-04-27 02:35 AM Re: TranslateName() & InContainer() - What OU am I in?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Let's start with what InContainer() actually does. InContainer calls TranslateName() binding to the global catalog (GC:). Notice that the first parameter used in the TranslateName call is '3'. The documentation for the TranslateName() UDF shows that you can use 1, 2, or 3 for the first parameter which controls where the function binds.

Depending on the health of your infrastructure the replication of data from domains to the GC may be compromised.

Try this:
Code:

Break on

$rc = SetOption("Explicit", "ON")
$rc = SetOption("NoVarsInStrings", "ON")
Dim $DN, $start

; This binds to the GC:
$start=@ticks
? "bind to GC"
$DN = TranslateName (3, "", 3, @domain + "\" + @wksta + "$", 1)
? $DN[0]
? "Elapsed Time: " + (@ticks-$start) + " ticks"
?

; This binds to a Logon domain DC:
$start=@ticks
? "bind to server: " + substr(@Lserver, 3)
$DN = TranslateName (2, substr(@Lserver, 3), 3, @domain + "\" + @wksta + "$", 1)
? $DN[0]
? "Elapsed Time: " + (@ticks-$start) + " ticks"
?


; This binds to the domain where the computer account resides.
$start=@ticks
? "bind to " + @domain
$DN = TranslateName (1, @domain, 3, @domain + "\" + @wksta + "$", 1)
? $DN[0]
? "Elapsed Time: " + (@ticks-$start) + " ticks"
?
exit 1



For the server and domain values, try to hard code some specific server names and domain names throughout your environemnt.

Does the script always return the expected DN? Remember to include the TranslateName UDF in the script.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#138427 - 2005-04-27 04:49 PM Re: TranslateName() & InContainer() - What OU am I in?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
You are the MAN Howard!!
That really split it up it useful bits of information that I can show to my upper level Domain Admins. It looks like it IS the GC that is "mucked-up".

Thanks again!!
-jdogg

Oh... here was the result:
Code:
bind to GC
CN=AUSRESC0200,OU=Computers,OU=US-RTP-Test,DC=na,DC=agrogroup,DC=net
Elapsed Time: 7421 ticks

bind to server: AUSPTBDC001
CN=AUSRESC0200,OU=Clients,OU=Admin US-RTP,OU=US-RTP,DC=na,DC=agrogroup,DC=net
Elapsed Time: 6960 ticks

bind to RTP
CN=AUSRESC0200,OU=Clients,OU=Admin US-RTP,OU=US-RTP,DC=na,DC=agrogroup,DC=net
Elapsed Time: 6259 ticks


Top
#138428 - 2005-04-27 08:27 PM Re: TranslateName() & InContainer() - What OU am I in?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I am really surprise by the long times the script generated for you. My GC: and domain where the computer lives returned data in around 500 ticks over a VPN connection from home. Your 6 seconds times are somewhat concerning to me.

Do you have the Micorosft SITE definitions properly defined? Maybe there is also an issue with the DNS underscore zones. just thinking out loud...
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#138429 - 2005-04-28 04:23 AM Re: TranslateName() & InContainer() - What OU am I in?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Hmm... well to be honest I am not sure about the site definitions. Our domain was set up by the upper level domain admins... I am just a site server admin (as well as other things). The whole domain runs my logon script though because they realized that Kix RULES!!

Anyway, both of those questions you asked would have to be forwarded to the domain guys above me... unfortunately I am not even sure how hard they are working on the FIRST issue that we identified. If I give them something else to do, I might as well pack a lunch for the time it takes them to respond. (in their defense, they are spread really thin).

Thanks again for the help.
-jdogg

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 209 anonymous users online.
Newest Members
dimi575, Drecksnacken, Nlill, webtools321, multiman
17734 Registered Users

Generated in 0.113 seconds in which 0.092 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org