Page 1 of 2 12>
Topic Options
#45496 - 2003-09-18 10:18 AM running right login script
andysk Offline
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
#45497 - 2003-09-19 12:26 AM Re: running right login script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k.
first thing first.
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.

finally, what comes to dos-boxes...
do they run logonscripts? [Eek!] [Confused] [Eek!]

[ 18. September 2003, 12:26: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#45498 - 2003-09-19 06:11 AM Re: running right login script
andysk Offline
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 Offline
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
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#45500 - 2003-09-19 06:23 PM Re: running right login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The DOS boxes will need KiXtart v2.33 as their logon script.

You should implement NETLOGON folder replication. The login script will then run from the DC that resonds first, normally the closer one.
_________________________
There are two types of vessels, submarines and targets.

Top
#45501 - 2003-09-20 07:21 AM Re: running right login script
andysk Offline
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
#45502 - 2003-09-20 04:09 PM Re: running right login script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
For DOS boxes, you could simply set an environment var on each box to the home site, and then check it in the NTLOGON.BAT, branching as needed.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45503 - 2003-09-23 05:04 AM Re: running right login script
Paul_Berquam Offline
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
#45504 - 2003-09-23 04:02 PM Re: running right login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also the FAQ Forum for a primer on TCP/IP and disseminating IP addresses via UDFs and mapping based on subnets.
_________________________
There are two types of vessels, submarines and targets.

Top
#45505 - 2003-09-25 07:40 AM Re: running right login script
andysk Offline
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
#45506 - 2003-09-25 08:21 AM Re: running right login script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it can't be.
think about it.
there is someone using the bandwidth from the wrong end.
then in this end comes someone.
do you think that when there is already use in the tight pipe that the server in the other end will still be faster to reply to wksta's logon request?

if it can be, I will like to know.
sure, I remember the cases where users got their logonscript from about 30km away instead of the next door.
just is not worth worrying if from 5000 users 5-10 or even 20 drop to slow line.

ok, enough soft talk.
indeed, multiple users downloading kix over slow link when another server is next door, seems quite impossible.
_________________________
!

download KiXnet

Top
#45507 - 2003-09-25 11:58 AM Re: running right login script
andysk Offline
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
#45508 - 2003-09-26 04:36 PM Re: running right login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
They will get the script from the authenticating server, whichever that one is.

You can alwasy use a tiny launch script that starts the main login script based on the IP address of the client.
_________________________
There are two types of vessels, submarines and targets.

Top
#45509 - 2003-09-26 05:48 PM Re: running right login script
Howard Bullock Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45510 - 2003-09-26 07:10 PM Re: running right login script
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
I have seen 2 machines side by side respond to different DC. One was an older Pentium I Win95 & the other a newer Pentium III NT. To ensure that a specific server is accessed you might need to force users to specific servers.
_________________________
Jack

Top
#45511 - 2003-09-26 07:31 PM Re: running right login script
Howard Bullock Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45512 - 2003-09-27 06:01 AM Re: running right login script
andysk Offline
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 Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45514 - 2003-09-28 11:26 PM Re: running right login script
MCA Offline
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.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#45515 - 2003-09-28 11:42 PM Re: running right login script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
MCA,
Before making such a blanket statement...
quote:
we suggest also to install kixtart files (kix32.exe
+ kx16.dll, kx32.dll, kx95.dll) on your clients

it is important to inform under what circumstance what DLLs should be included on what OSes.

On WinNT/2K/XP the DLLs should NEVER be installed.
On Wintendos, the KX95.dll should ONLY be installed if the KXRPC service is used.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 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 687 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.142 seconds in which 0.112 seconds were spent on a total of 13 queries. Zlib compression enabled.

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