Page 1 of 3 123>
Topic Options
#29465 - 2002-09-23 11:00 PM Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
I'm a bit confused. I've been lurking around this board for a week or so trying to find out how to deal with this on my own and can't seem to find the right answer. I have a test bed, 1 DC (2K) and a bunch of workstations (XP only). I've installed Kix on the DC and added the needing things the AD section to kick off the script. When I try and login, first it takes forever (20-35 seconds versus non-script logins of 1-2 seconds). Second, my objective (drive mappings) don't work. I tried to add a tad of code to display this information better for me to see what was going on but the jist of it is that the INGROUP doesn't seem to understand the groups the user is really a part of.

User: X1
Groups In: Test1, Test2, and Test3

Script:
code:
;Make the window appear
IF @dos = 5.0
$HKLMS = 'HKEY_LOCAL_MACHINE\SOFTWARE'
IF 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon",
"RunLogonScriptSync")
$ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlog
on", "RunLogonScriptSync", "1", "REG_DWORD")
ENDIF
ENDIF


;Clear all possible network drive mappings

use M: /d
use N: /d
use O: /d
use P: /d
use Q: /d
use R: /d
use S: /d
use T: /d
use U: /d
use V: /d
use W: /d
use X: /d
use Y: /d
use Z: /d

IF InGroup("Test1")
? "Mapping X:"
use X: \\dusty\1
If @error = 0
? " Mapping of drive X Successful"
ELSE
? " Error mapping drive X to \\Dusty\1"
ENDIF
ELSE
? " Not in Test1"
ENDIF

IF InGroup("Test2")
? "Mapping X:"
use Y: \\dusty\2
If @error = 0
? " Mapping of drive Y Successful"
ELSE
? " Error mapping drive Y to \\Dusty\2"
ENDIF
ELSE
? " Not in Test2"
ENDIF
IF InGroup("Test3")
? "Mapping Z:"
use Z: \\dusty\3
If @error = 0
? " Mapping of drive Z Successful"
ELSE
? " Error mapping drive Z to \\Dusty\3"
ENDIF
ELSE
? " Not in Test3"
ENDIF

Color y+/n
At (23,32) "<any key to continue>"
Get $x

What I end up with is Not in Test1, etc etc for all the groups when the user IS in those groups. Also, I tried running the kix.kix that came with kixtart (sample) to see what groups the user was supposed to be in and even that doesn't show the right memberships - but I can manually map a drive which could only be done if this user was in that group! I am logging into the DC and I'm not sure what else to do. HELP!
_________________________
Thanks, Sasifras

Top
#29466 - 2002-09-24 12:45 AM Re: Drive Mappings - XP, etc
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Instead of deleting each drive separately, you can do
code:
use * /delete

Secondly, by default, only local administrators can write to HKEY_LOCAL_MACHINE.
_________________________
There are two types of vessels, submarines and targets.

Top
#29467 - 2002-09-24 01:17 AM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
I only want to delete certain drives - the rest are in 'user definable' space for non-standard things...

In terms of the reg-hack, you are implying that I need to run this with boosted rights or ensure each user who logs in has local admin rights - correct?
_________________________
Thanks, Sasifras

Top
#29468 - 2002-09-24 01:37 AM Re: Drive Mappings - XP, etc
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
If you want to make changes to HKEY_LOCAL_MACHINE under Windows NT/2000/XP, then most likely administrative privileges will be required. However, you can also specify RunLoginScriptSync on a per-user level by writing to HKEY_CURRENT_USEr or implement it via GPO if you have an AD domain.
_________________________
There are two types of vessels, submarines and targets.

Top
#29469 - 2002-09-24 03:58 AM Re: Drive Mappings - XP, etc
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If testing newly created groups then you may be fighting the group membership cache.

YOu may want to start with well known groups or launch KiX with the /F option.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#29470 - 2002-09-25 12:58 AM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
I am starting kixtart with the /f option already. These groups are at least 2 weeks old now. What I don't understand is why when I run the kix.kix sample (which will display group membership) it only shows the LOCAL groups - nothing from the domain and I'm logging into the domain???
_________________________
Thanks, Sasifras

Top
#29471 - 2002-09-25 02:45 AM Re: Drive Mappings - XP, etc
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Do you get the same results with an admin account? Anything in the kixtart.log?

I'm thinking you may have an AD permission issue.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#29472 - 2002-09-25 11:26 PM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
Well... I tried logging in as the Admin on an XP machine (domain admin) who I've added the login script to in AD. It still takes forever to apply the personal settings (30+ seconds when the script is active) and then it still didn't work...
_________________________
Thanks, Sasifras

Top
#29473 - 2002-09-27 10:32 PM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
Ok...I'm totally stuck. I know the problem is that when I run INGROUP it doesn't correctly see what group(s) the users are in...but why?!?! If I can't get this working soon I'll have to bag this whole idea and try something down another path [Frown]
_________________________
Thanks, Sasifras

Top
#29474 - 2002-09-27 11:04 PM Re: Drive Mappings - XP, etc
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
this is getting nice...

questions:
what kix version?
what is the OS?
 
_________________________
!

download KiXnet

Top
#29475 - 2002-09-27 11:36 PM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
kix ver 4.11
OS Win2K Server, PC's all XP - pure AD
_________________________
Thanks, Sasifras

Top
#29476 - 2002-09-27 11:43 PM Re: Drive Mappings - XP, etc
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Did you create "GLOBAL" groups or "Domain Local" groups in the domain?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29477 - 2002-09-27 11:45 PM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
Global in most cases. On the production setup they'll all be Universal though
_________________________
Thanks, Sasifras

Top
#29478 - 2002-09-27 11:46 PM Re: Drive Mappings - XP, etc
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Something's not quite making sense here.. A 30 second delay sounds like an issue with how it's being processed across the network. As such, have you tried copying the script locally and running it? (A local copy of kixtart would be nice, too)

Brian

[ 27. September 2002, 23:48: Message edited by: BrianTX ]

Top
#29479 - 2002-09-27 11:52 PM Re: Drive Mappings - XP, etc
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Domain local groups are not visible to member servers or workstations until the domain is running in native mode. I do not have any experience with native mode, domain local groups, and KiXtart at this time.

Check the registry on a client computer. Does this key (HKEY_CURRENT_USER\Software\KiXtart\TokenCache) exist?

code:
if ingroup("GlobalGroupName")
? "In the group"
else
? "NOT in the group"
endif

Execute the code in a DOS window. What is the result? Note that If you make change to a group you will have to logoff and logon before testing. This is because INGROUP reads the Global Group membership from the security token of the user and does not check the domain DC.
Write a simple test script that references a global group.

[ 27. September 2002, 23:53: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29480 - 2002-09-27 11:58 PM Re: Drive Mappings - XP, etc
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
You have to delete 'persistent' connections as well when you disconnect drives:
code:
If InGroup("Test1")
? "Mapping X:"
Use X: /Delete /Persistent
Use X: "\\dusty\1"
If @Error = 0
? " Mapping of drive X: Successful"
Else
? " Error mapping drive X: to \\dusty\1"
EndIf
Else
? " Not in Test1"
EndIf

/Persistent along with /Delete is the keyword

-Erik

Top
#29481 - 2002-09-28 12:30 AM Re: Drive Mappings - XP, etc
sasifras Offline
Fresh Scripter

Registered: 2002-09-23
Posts: 16
Let me try and answer all of the new troubleshooting questions:

Delete the persistant connections first: I've done that, check out the top of the script. I don't do a * becuase I need to only remove certain letters and I never map outside of those I've deleted. I'm not sure why the /persistant would apply to the /delete but I can try it if you think it'd help (the real issue here is the INGROUP - that I've been able to determine).

Check the registry on a client computer. Does this key (HKEY_CURRENT_USER\Software\KiXtart\TokenCache) exist?

Yes - with all the different users I've tried in it.

Using your code sample would be just like using mine without the mapping statement, right? Regardless, it goes to the ELSE section for all groups tested against.

Running the script locally: Yes, I tried, the script runs rather slowly locally as well. In debug mode, it hangs for 5-15 seconds on the first INGROUP and then processes normally beyond that. The results still aren't what I want, but that is what I think is causing the speed issue - some bad lookup somehow/somewhere.

Thanks for all the new ideas...
_________________________
Thanks, Sasifras

Top
#29482 - 2002-09-28 01:31 AM Re: Drive Mappings - XP, etc
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Check your event log and the KiXtart.log file for errors. I still have a feeling it's an AD perms issue.

Barring that, check for extra protocols. Also check for binding order and provider order.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#29483 - 2002-09-30 12:57 AM Re: Drive Mappings - XP, etc
Sverre Offline
Getting the hang of it

Registered: 2002-09-29
Posts: 52
I have heard that Xp machines tend to run wery slow on networks. I experience the same thing myself, XP machines more than 30 secs, W2K machines less than 5 secs to run login script.
Top
#29484 - 2002-09-29 03:50 PM Re: Drive Mappings - XP, etc
Fernando Madruga Offline
Starting to like KiXtart

Registered: 2002-08-21
Posts: 149
Loc: Coimbra.Portugal.Europe.Earth....
Actually, if MSFT did what they claim to, XP will "appear" to run logon scripts slower than W2K machines... They say that, in order to boost boot up time, you can get to a "press ctl-alt-del prompt" BEFORE the network is fully initialized. Problem is, when you "need" the network in order to run scripts and perform AD lookups or such, you'll have to wait for the network components of XP to be fully operational.
Don't know if this may help, but you could try setting up a W2K Pro machine, run some tests on it, then upgrade it to WXP and run the same tests.
_________________________
Later,   [b]Mad[/b]ruga

Top
Page 1 of 3 123>


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.076 seconds in which 0.029 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