#46294 - 2003-10-03 04:30 PM
Maps to logon server
|
Shintra
Fresh Scripter
Registered: 2003-10-03
Posts: 6
Loc: Enschede / Netherlands
|
Hello everyone. I'm rather new to using kixstart.
This is my situation:
There are 3 subnets, 3 Domains and all of them have a data share M:(data$)and a applications share O: (apps$)
In my script users are provided with the mappings to the shares like this:
If InGroup("Groupname") use M: \\"Servername\data$" use O: \\"Servername\apps$" ENDIF
If a user switches from subnet, his M: and O: mappings will allways point to the same server. Which obviously is very bandwith intensive, since there are three geographicaly spread locations.
How can I achieve that, when a user logs on, his M: and O: mapping will point to the logonserver?
Can I user variables for this, and what do they look like? Any reactions will be very welcome.
Greetz,
Shintra
|
|
Top
|
|
|
|
#46296 - 2003-10-03 11:46 PM
Re: Maps to logon server
|
Clancy
Fresh Scripter
Registered: 2002-08-26
Posts: 14
Loc: Reno, NV
|
What about using @site to map these clients, provided you have active directory (which you didn't say you did or didn't).
I've never played with it myself, I'm still living in a very heterogeneous network environment of 9x / 2k / XP clients.
|
|
Top
|
|
|
|
#46297 - 2003-10-04 03:52 PM
Re: Maps to logon server
|
Shintra
Fresh Scripter
Registered: 2003-10-03
Posts: 6
Loc: Enschede / Netherlands
|
Thank you,
This is very usable information. I read about the @Lserver macro in the manual but did not know how to use it correctly.
This will very likely solve my problem.
And, yes, indead we use AD. So the use of @site could be very interesting. I'll see if I can do something with it.
Greetz, Shintra
|
|
Top
|
|
|
|
#46300 - 2003-10-06 01:47 PM
Re: Maps to logon server
|
Shintra
Fresh Scripter
Registered: 2003-10-03
Posts: 6
Loc: Enschede / Netherlands
|
Hello,
I used the macro @lserver and this gives a good result.
I tried the option "case isinsubnet" stated 2 posts back, but I can't get this working. Searched for options using the expresion "isinsubnet" but didn't find anything.
The macro @site would be nice to use but since we do have 9x clients as well, this won't realy work.(unless dsclient must support this compatibility)
Thx for all your answers. If anyone knows how I can correctly use the "isinsubnet" expression that Sealeopard came up with, please make a post.
Greetz,
Shintra
|
|
Top
|
|
|
|
#46301 - 2003-10-06 01:56 PM
Re: Maps to logon server
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Hmm..
Cannot find isinsubnet..
Go to Search..
Search words: isinsubnet
You could change it to "Search all open forums", but we'll change it to "UDF Library"..
Voila!
There are five results for you.
HTH,
Kent
|
|
Top
|
|
|
|
#46303 - 2003-10-28 11:42 AM
Re: Maps to logon server
|
Shintra
Fresh Scripter
Registered: 2003-10-03
Posts: 6
Loc: Enschede / Netherlands
|
I'm Sorry,
I'm not experienced using code, that's why I visit this BB.
What I meant actually is that I could not find out how to use it correctly.
On and off I tried some lines in the script but I can't get ik working.
I'd like to use the code provided by Sealeopard
Select case isinsubnet(@ipaddress0,'192.168.1.0/24') use u: '\\server1\share' case isinsubnet(@ipaddress0,'192.168.2.0/24') use u: '\\server2\share' endselect
When I use this in my script, it gives an error in the line; 'case isinsubnet(@ipaddress..)
Part of the script looks like this; _____________________________________________ IF INGROUP("TKH") USE M: /DELETE /PERSISTENT USE M: @LSERVER+"\DATA$" USE O: /DELETE /PERSISTENT USE O: @LSERVER+"\APPS$" ENDIF
@IPADDRESS0
SELECT CASE ISINSUBNET(@IPADDRESS0,"10.10.10.0/24") USE U: "\\S000\"+@USERID+"$" CASE ISINSUBNET(@IPADDRESS0,"10.10.20.0/24") USE U: "\\S001\"+@USERID+"$" ENDSELECT _____________________________________________
Obviously I'm going wrong somewhere, so please help.
I don't want to use @site because we still have W9x clients.
Greetz, Shintra
|
|
Top
|
|
|
|
#46305 - 2003-10-28 03:32 PM
Re: Maps to logon server
|
Shintra
Fresh Scripter
Registered: 2003-10-03
Posts: 6
Loc: Enschede / Netherlands
|
Hello Basta,
Thx for your information.
What I want the result of the script to look like is for users only to have a U: mapping when they are in their "home"subnet. When a user logs on in any other subnet, he should not get a U: mapping. The M: and O: mapping can always exist.
Following is the testscript I use to find out how to provide user with a U: mapping based on their subnet. __________________________________________________ ;DEBUG "ON"
IF INGROUP("TKH") USE M: /DELETE /PERSISTENT USE M: @LSERVER+"\DATA$" USE O: /DELETE /PERSISTENT USE O: @LSERVER+"\APPS$" ENDIF
@IPADDRESS0
SELECT CASE ISINSUBNET(@IPADDRESS0,"10.10.10.0/24") USE U: "\\S000\"+@USERID+"$" CASE ISINSUBNET(@IPADDRESS0,"10.10.20.0/24") USE U: "\\S001\"+@USERID+"$" ENDSELECT
SELECT CASE INGROUP("DKP-PRINTER1") AddPrinterConnection("\\S000\DKP-PRINTER1")
CASE INGROUP("ENS-PRINTER1") AddPrinterConnection("\\S000\ENS-PRINTER1") CASE INGROUP("HBG-PRINTER1") AddPrinterConnection("\\S001\HBG-PRINTER1") ENDSELECT __________________________________________________ The error returned is;
Error : expected expression! Script: c:\kixtart.kix line : 13
I'm using kixtart version 4.21 from the netlogon share using a Windows 2000 client.
I also tried the following lines;
Select case ingroup("S000")and isinsubnet (@ipaddress0,"10.10.10.0/24") use u: "\\S000\+@userid+"$"
case ingroup("S001") and isinsubnet(@ipaddress0,"10.10.20.0/24") use u: "\\S001\+@userid+"$" endselect
Earlier today I read something about that technique is making it easier for the complex mind and more complex for the simple mind.
To me this is true about scripting, that's why I turned to this BB.
Something is missing in my script. Could you tell me what?
Greetz, Shintra
|
|
Top
|
|
|
|
#46307 - 2003-10-28 04:01 PM
Re: Maps to logon server
|
Shintra
Fresh Scripter
Registered: 2003-10-03
Posts: 6
Loc: Enschede / Netherlands
|
Thanks Les,
You're right and I know you are. But that's what I don't know about my issue. How does this UDF look like and where do I place this in my script?
Greetz, Shintra.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 874 anonymous users online.
|
|
|