#21207 - 2002-05-04 03:39 PM
Multiples sites and logon scripts - little advice please?
|
Anonymous
Anonymous
Unregistered
|
Hi All,
I have three sites, A, B, and C.
A is our mainsite with approx 500 9x/nt/2k PC's.
B&C are small remote sites with approx 25 PC's each, 90% NT/2k with 10% Win9x.
The two remotes are connected to mainsite over 256kbps leased lines.
We're in the process of merging the remote sites to be part of a single Windows 2000 domain.
The main site has four DCs, each remote site will also have a DC.
I'm looking for a way of making sure that whenever someone logs on they are running the various apps that the logon script calls locally from the site they're in rather than over the link (antivirus/audit software/software usage policy reminder etc..).
I can see of two ways of doing this:
Use the @lserver variable to call these programs from the site holding the validating server.
IF @LSERVER="B_PDC" SHELL @LDRIVE + "\B_antivirus.bat" ENDIF
This works on the principle that 90% of the time the first logon server to resond will be the local one.
Or use something I read about here, like
IF substr(@ipaddress)="10.65." SHELL @LDRIVE + "\B_antivirus.bat" ENDIF
I'd have thought the latter is the foolproof method as the the IP address must be on a different subnet for each site, so even if you logon against a remote server your IP address shows which site you're in.
As a final quickie, I assume "shell" is the command to use to call a batch file but wait for it to run before continuing?
I'd be extremely grateful for any advice or pointers!
rgds Paul [ 04 May 2002, 15:44: Message edited by: hutchingsp ]
|
|
Top
|
|
|
|
#21209 - 2002-05-04 04:45 PM
Re: Multiples sites and logon scripts - little advice please?
|
Anonymous
Anonymous
Unregistered
|
Thanks for the reply - you're right, I didn't think through that using the @ipaddress method that @ldrive won't always be the in the local site.
As for the substr statement I guess it should look like
if substr(@ipaddress0,1,8)="10 .65 ."
I hope to move the whole lot to kixtart, I'm doing it little by little and trying to get the important bits that users notice to run smooth first.
regards Paul
|
|
Top
|
|
|
|
#21211 - 2002-05-04 05:06 PM
Re: Multiples sites and logon scripts - little advice please?
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If you use the Subnet mask such as 255.255.255.128 generate different subnets (1-127) and (129-254) then lookup CalcLogicalSubnet. This UDF will permit you to easily call a subscript based or perform logical branching based on the client subnet.
Also, if you use W2K domains and install the DScLient on your clients. The site property will do this for you. [ 04 May 2002, 17:09: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#21213 - 2002-05-04 05:41 PM
Re: Multiples sites and logon scripts - little advice please?
|
Les
KiX Master
   
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
Jens, in your example regardless of whether the local or remote DC authenticates you, you are still SHELLing to the authenticating DC contrary to our client's need to SHELL to the local DC.
Paul, I'm a 'teach a man to fish' kinda guy so I leave it to you to come up with the code.
Since your main site has four DCs, you may want to rethink the methodology to use exception instead. That is, check to see if the @LServer is in the client's subnet. To hard code the server name to the subnet would disadvantage the main site.
Since I don't have an understanding of how your DCs are setup I can only surmise. On my network, my DCs only do authentication, DHCP, DNS, and WINS. All other things, like SQL, NAV, email, etc. are handled by separate application servers. I can see where in a small branch, you may consolidate onto fewer servers, but cannot imagine that to be the case for the main site.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
|
|
Top
|
|
|
|
#21214 - 2002-05-04 05:42 PM
Re: Multiples sites and logon scripts - little advice please?
|
Anonymous
Anonymous
Unregistered
|
We're using 3.64 (if I remember, definately 3.6x)
I took a look at the UDF - I'm not clear what extra this would do for me? (though I'm a kixtart beginner)
So far as using SELECT CASE , given I only have three sites/subnets would there be any noticable difference, or is it simply "best practice" to use CASE?
What's comspec - as in
SHELL '%COMSPEC% /C /E:1024 '+@LDRIVE+'\B_antivirus.bat'
Paul
|
|
Top
|
|
|
|
#21216 - 2002-05-04 06:10 PM
Re: Multiples sites and logon scripts - little advice please?
|
Anonymous
Anonymous
Unregistered
|
Thanks to everyone who replied, I appreciate it.
I think I have a plan for Monday - I'm going to try to "keep it simple" and attempt to rewrite the mash of batch files we currently use into Kixtart - I intend to initially try a simple CASE statement to run commands based on the IP (and therefore location) of the machine.
Les - fully agree with the "teach a man to fish" principle - I appreciate the pointers.
rgds Paul
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 611 anonymous users online.
|
|
|