#45496 - 2003-09-18 10:18 AM
running right login script
|
andysk
Fresh Scripter
Registered: 2003-09-18
Posts: 14
|
Hi, I am a newbie here. Before i go to my question, i will describe the network structure first. - We use NT Server 4.0 as our server
- We have a PDC on our HQ (let's call it HQ) and a BDC at our branch (let's call it BR).
- On Both places, we have clients with OS vary from DOS 5.0 to Windows XP.
- We use fixed IP to identify our workstations and servers, 192.168.1.X (for HQ) and 192.168.2.X (for BR) except for DOS.
- On both places, we had login script:
HQ - NET USE G: \\PDC\DATA BR - NET USE G: \\BDC\DATA - WAN communication from HQ to BR (VV) we use L/C (only 128 kbps).
Now the question are as follows : - I want to grab the correct login script. ex. When i am at HQ, i want to to run login script at HQ. Somebody tell me, i can just use KiXtart to overcome this problem, and i found it really help me (I use @IPADDRESS0 to identify where am i now and use SHELL to execute the right NET USE). Everything works well except for DOS workstation since they don't have IP Address. How do i overcome this ?
- Since the size of KIX32 is about 230KBytes, while our WAN bandwidth is only 128 kbps and we have a lot of workstation on both places, how do i tell the server to grab the correct KIX32 to save our bandwidth. ex. when i am at HQ, it will run KIX32 from HQ. How do i overcome this (i don't want to copied it to every station manually)?
|
|
Top
|
|
|
|
#45498 - 2003-09-19 06:11 AM
Re: running right login script
|
andysk
Fresh Scripter
Registered: 2003-09-18
Posts: 14
|
quote: instead of net use, read the manual for USE. this way you don't need shelling and your script will definitely run faster.
the logonscript is always drawn (IIRC) from the server with best response/willingness.
you could check on that. at to very start of your script:
code: --------------------------------------------------------------------------------
"our logonscript - ver 1.1" ?"run from: @lserver" ?
--------------------------------------------------------------------------------
thus, you would see that info always. this being the simpliest way, obviously.
I will tried @LServer. Using the normal login script (using .bat file, haven't applied KiXtart), some PCs always get login script from the wrong server. ex. when i am at BR, those will run the login script from HQ (which is i don't expect that).
If i applied KiXtart, i am afraid it will also run KIX32 from the wrong server since we have limitation on bandwidth.
quote: finally, what comes to dos-boxes... do they run logonscripts?
currently yes.
|
|
Top
|
|
|
|
#45499 - 2003-09-19 08:37 AM
Re: running right login script
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
How are you starting the KiXtart script?
Can you show what you have for the NTLOGON.BAT?
Thanks,
Kent
|
|
Top
|
|
|
|
#45501 - 2003-09-20 07:21 AM
Re: running right login script
|
andysk
Fresh Scripter
Registered: 2003-09-18
Posts: 14
|
on both server, in the NTLOGON.BAT, we call KIX32 kixstart.kix in which will look for local IP to identify where am i now (whether at HQ or BR).
KIX32.EXE and Kixstart.kix we place it on NETLOGON folder also
|
|
Top
|
|
|
|
#45503 - 2003-09-23 05:04 AM
Re: running right login script
|
Paul_Berquam
Hey THIS is FUN
Registered: 2000-08-02
Posts: 310
Loc: Sacramento, CA USA
|
You could do something like this:
code:
$tcpip = @IPAddress0 $3octet = val(substr($tcpip,9,3)) ;Assuming all of your IP addresses use a single digit class C
SELECT Case $3octet = 1 $location = "Headquarters" $localserver = "HQ"
Case $3octet = 2 $location = "Branch Office" $localserver = "BR"
Case 1 "Something screwy going on if you don't have either of these IP addresses" EndSelect
;Time to map drives
? "YOu are located at the $location office"
? "Connecting G: to \\$localserver\data" use g: "\\$localserver\data"
[ 23. September 2003, 07:57: Message edited by: Paul_Berquam ]
_________________________
He was a good little monkey and always very curious...
|
|
Top
|
|
|
|
#45505 - 2003-09-25 07:40 AM
Re: running right login script
|
andysk
Fresh Scripter
Registered: 2003-09-18
Posts: 14
|
quote: You could do something like this:
code: --------------------------------------------------------------------------------
$tcpip = @IPAddress0$3octet = val(substr($tcpip,9,3)) ;Assuming all of your IP addresses use a single digit class CSELECT Case $3octet = 1 $location = "Headquarters" $localserver = "HQ" Case $3octet = 2 $location = "Branch Office" $localserver = "BR" Case 1 "Something screwy going on if you don't have either of these IP addresses"EndSelect;Time to map drives ? "YOu are located at the $location office" ? "Connecting G: to \\$localserver\data" use g: "\\$localserver\data"
--------------------------------------------------------------------------------
[ 23. September 2003, 07:57: Message edited by: Paul_Berquam ]
OK. That path i already implement, How about bandwidth concern ? Since sometime it will grab KIX32 from unexpected server. KIX32 size is around 200K while our bandwidth is around 128 Kbps, can you imagine if everybody (more than 200 users) grab from unexpected server, our bandwidth is dying.
|
|
Top
|
|
|
|
#45507 - 2003-09-25 11:58 AM
Re: running right login script
|
andysk
Fresh Scripter
Registered: 2003-09-18
Posts: 14
|
It's truly happened to me, i don't know why. That's why i confused, why they grab it from unexpected server. Am i missing some setting or what ? How do i set it ? If you don't mind, please tell me in step-by-step. Thanks. [ 25. September 2003, 12:00: Message edited by: andysk ]
|
|
Top
|
|
|
|
#45509 - 2003-09-26 05:48 PM
Re: running right login script
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Are you using WINS name resolution or other method of NetBIOS name resolution.
Your remote DC may be responding first if it is queried first or the local DC may be under powered and a little slow to respond.
You will get the logon script from the authenticating DC. We need to determine why the remote DC is responding before the local DC.
We can look at the oder of the WINS DomainName [1C] list LMHOSTS related entries etc.
Are the client NT or higher? Do you have a local NT resource domain separate from the account domain? [ 26. September 2003, 17:49: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#45511 - 2003-09-26 07:31 PM
Re: running right login script
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
The win9x computer finds the authentication server differently from any NT-based computer. that is why I ask which OS were involved.
We can easily control an NT based computer, but Win9x will try every entry in the WINS DomainName [1C] list picking the first to respond.
NT class computers are slightly different and can be controlled. [ 26. September 2003, 19:31: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#45512 - 2003-09-27 06:01 AM
Re: running right login script
|
andysk
Fresh Scripter
Registered: 2003-09-18
Posts: 14
|
I activated WINS only on both server, while on clients i didn't activate it at all. Our workstations are vary from DOS, Windows 95, 98, Me, 2000 and XP.
FYI, On My Windows XP, they also grab from unexpected server.
|
|
Top
|
|
|
|
#45513 - 2003-09-27 03:50 PM
Re: running right login script
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If you wish we can explore the reasons why this is occurring. You will need to provide a detail description of your network design and your domain architecture.
Are you using DHCP or statically assigned IP addresses?
If you have WINS servers running, why do you not have the clients configured to use them?
What domain model do you have implemented? Please describe in detail.
How many subnets?
Do you have the routers configured to block broadcast packets? [ 27. September 2003, 15:50: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#45514 - 2003-09-28 11:26 PM
Re: running right login script
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
To reduce bandwidth we suggest also to install kixtart files (kix32.exe + kx16.dll, kx32.dll, kx95.dll) on your clients. Your scripts will not be so big.
How we did this see topic KiX upgrade: what are those new features? can upgrade be done without any danger?
Of couse for the DOS environment you will need other binaries. Of course it can be necessary that you are developping different scripts for your different environments. In our situation to reduce bandwidth we starts all clients with same script (small + fast). Based on f.e. LAN or modem connection we start our full scripts or very short one. In the modem si- tuation we are collecting wanted information temporary on the client and during a LAN connection we will transfer those collected data to the server.
greetings.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 989 anonymous users online.
|
|
|