#75564 - 2003-06-27 07:36 PM
Beginner: Drive mapping question
|
Laura
Fresh Scripter
Registered: 2002-01-25
Posts: 7
Loc: MD
|
Hi! I've got a working Kixtart login script (Kixtart is great!) however I'm trying to modify a group and it will not map that group to a drive.
The original line is:
select case ingroup("Administration List") use g: "\\fileserv\shared\administration" endselect
I want to change it to:
select case ingroup("AIST") use g: "\\fileserv\shared\administration" endselect
I simply replace Administration List with AIST and the drive won't map. I've tried to create another script with no variables and I don't get the mapping. However when I change AIST back to Administration List it works again. I've checked rights and permissions on the server and those are all working correctly.
Any ideas?
Thank you Laura
|
|
Top
|
|
|
|
#75565 - 2003-06-27 07:39 PM
Re: Beginner: Drive mapping question
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Laura,
Why not just do this?
code:
if ingroup("AIST") use g: "\\fileserv\shared\administration" endif
If this does not work, try preceding "AIST" with "DOMAIN\AIST".
The SELECT..CASE.ENDSELECT is used in the event where you would have many IF..ENDIF statements. The caveat to SELECT..CASE..ENDSELECT is where it will find the first true condition and leave.
Are these NT, 2K, or better workstations?
HTH,
Kent [ 27. June 2003, 19:41: Message edited by: kdyer ]
|
|
Top
|
|
|
|
#75567 - 2003-06-27 07:46 PM
Re: Beginner: Drive mapping question
|
Laura
Fresh Scripter
Registered: 2002-01-25
Posts: 7
Loc: MD
|
Thanks, Kent!
Actually we do have many departments in that section of the login script which is why we are using select/case/endselect functions. I've tried isolating the line into a new script and testing with both if/endif and select/endselect but its no go.
I did just test with the domain\AIST and it won't run.
I thought it might be that we have two similarly named groups but changing the name produced no positive result.
Thanks! Laura
|
|
Top
|
|
|
|
#75569 - 2003-06-27 07:50 PM
Re: Beginner: Drive mapping question
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Laura,
Back to my question - Are these NT/2K/XP?
What about Jens' - Deep Mapping?
Kent
|
|
Top
|
|
|
|
#75570 - 2003-06-27 07:55 PM
Re: Beginner: Drive mapping question
|
Laura
Fresh Scripter
Registered: 2002-01-25
Posts: 7
Loc: MD
|
Windows 2000 servers, and I'm testing on a Windows 2K workstation. We are using a mix of 2000 and XP desktops generally.
I'm looking in the manual for how to flush cache...not finding anything yet but I'll keep looking. Thanks!
Laura
|
|
Top
|
|
|
|
#75571 - 2003-06-27 07:56 PM
Re: Beginner: Drive mapping question
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Laura,
Page 19 of 4.21 manual.
KIX32 yourscript.kix /f
quote:
C:\>kix32 /?
KiXtart 2001 4.21 (Copyright Ruud van Velsen 2003) Microsoft Windows (logon) script processor.
Note: KiXtart 2001 is CareWare, please consult the manual for full details on distribution and licensing.
Usage :
KIX32 [script1] [...] [$var=123] [/f[:yyyy/mm/dd]] [/r:irel] [/d]
Options: /f = flush token cache (optionally only if older than date specified) /r = KXRPC search order (see manual for details) /d = enable debug mode
Kent [ 27. June 2003, 19:58: Message edited by: kdyer ]
|
|
Top
|
|
|
|
#75572 - 2003-06-27 09:02 PM
Re: Beginner: Drive mapping question
|
Laura
Fresh Scripter
Registered: 2002-01-25
Posts: 7
Loc: MD
|
Thanks!!
Flushing worked beautifully and it tested well. Now I can start on the other groups.
Laura
|
|
Top
|
|
|
|
#75574 - 2003-06-27 09:36 PM
Re: Beginner: Drive mapping question
|
Laura
Fresh Scripter
Registered: 2002-01-25
Posts: 7
Loc: MD
|
Thanks, Gaven. I'm working through the script cleaning it up; most of our staff are only in one group, or department. Any "special" interdepartment groups are handled in a different section with if/endif.
Laura
|
|
Top
|
|
|
|
#75576 - 2003-06-28 03:49 PM
Re: Beginner: Drive mapping question
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Gaven,
Did I hear an echo in here? I did not say it as eloquently as you. But, I did say with the SELECT..CASE..ENDSELECT it leaves this construct on the first true condition. That is with the INGROUP.. it leaves on the first true one. From her response, she understands this as well.
So.. Yes, you are right the IF..ENDIF structure is great when your users are members of more than one group.
Kent
|
|
Top
|
|
|
|
#75578 - 2003-06-30 10:55 PM
Re: Beginner: Drive mapping question
|
Laura
Fresh Scripter
Registered: 2002-01-25
Posts: 7
Loc: MD
|
*laugh* Yes, a gen-u-wine network admin!
So far the login script is working great and I'm testing it with if/endif statements which make things simpler.
On each test machine though I'm having to map to the kixtart script folder on the server and flush the kixtart cache. I've tried as different people, on different OS's, and even rejoining the computer to the domain.
Since y'all have saved my life before, any thoughts?
Laura (who checked the manual
|
|
Top
|
|
|
|
#75579 - 2003-06-30 11:12 PM
Re: Beginner: Drive mapping question
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
You would want to put your script and the KiXtart executables into the NETLOGON share, as described in the KiXtart Manual and the 'KiXtart Starters Guide' in the FAQ Forum.
The token cache flushing is normally not necessary when logging in. However, chnages to groups need to replicate across the DCs.
Finally, you can rearrange your drive mappings in more convenient ways, see for example this .INI file structurecode:
; Mandatory drive shares for users v1.0 ; ; Format: ; ;[Drive letter] ;UNC = UNC name of the drive share ;GroupInclude = User groups to be included in the drive share ;CompExclude = Computers to be excluded from the drive share ;UserInclude = Users to be included in the drive share ;NetworkType = Type of network connection allowed for this share (LOCAL, LAN, VPN, DIALUP) ;DenyGuestAccess = True if guests are not allowed to access this share
or alternatively this formatcode:
; Mandatory drive shares for users v2.0 ; ; Format: ; ;[UNC] ;Drive = drive letter to which the UNC name will be mapped ;GroupInclude = User groups to be included in the drive share ;CompExclude = Computers to be excluded from the drive share ;UserInclude = Users to be included in the drive share ;NetworkType = Type of network connection allowed for this share (LOCAL, LAN, VPN, DIALUP) ;Persistent = True if mapping is persistent ;DenyGuestAccess = True if guests are not allowed to access this share
This allows you to manage the drive shares without changing KiXtart code.
The KiXtart script section for drive mappings looks like thiscode:
;------------------------------------- ; subroutine to map drives based on user groups ; ; Structure of the .INI file: ; [Drive letter] ; UNC = UNC name of the drive share ; GroupInclude = User groups to be included in the drive share ; CompExclude = Computers to be excluded from the drive share ; UserInclude = Users to be included in the drive share ; NetworkType = Type of network connection allowed for this share (LOCAL, LAN, VPN, DIALUP) ; Persistent = True if mapping is persistent ; DenyGuestAccess = True if guests are not allowed to access this share ;------------------------------------- :NETWORKED_DRIVES Dim $driveletters, $drive, $unc, $persistent, $rc, $server Dim $GroupInclude, $CompExclude, $UserInclude, $denyguestaccess Dim $networktype
if not exist($SHARESINI) $rc=warning('NETWORKED_DRIVES: Cannot open network shares initialization file '+$SHARESINI) return endif
$rc=displaytext('Connecting network shares') $driveletters=readprofilestring($SHARESINI,'','') $driveletters=atrim(split($driveletters,chr(10))) for each $drive in $driveletters if $drive<>'' $unc=trim(readprofilestring($SHARESINI,$drive,'UNC')) if $unc<>'' $denyguestaccess=val(readprofilestring($SHARESINI,$drive,'DenyGuestAccess')) if $GUESTACCESS=1 and $denyguestaccess=1 $rc=displaytext('Guest access is not allowed to UNC '+$unc,1) use $drive+':' /delete /persistent else $networktype=readprofilestring($SHARESINI,$drive,'NetworkType') $networktype=atrim(split($networktype,',')) if isinarray($networktype,$NETWORKCONNECTION) $rc=displaytext('Network connection type '+$NETWORKCONNECTION+' authorized to map drive letter '+$drive,1) $GroupInclude=readprofilestring($SHARESINI,$drive,'GroupInclude') $GroupInclude=atrim(split($GroupInclude,',')) $CompExclude=readprofilestring($SHARESINI,$drive,'CompExclude') $CompExclude=atrim(split($CompExclude,',')) $UserInclude=readprofilestring($SHARESINI,$drive,'UserInclude') $UserInclude=atrim(split($UserInclude,',')) $persistent=val(trim(readprofilestring($SHARESINI,$drive,'Persistent'))) if isincluded($GroupInclude, $CompExclude, $UserInclude) $rc=mapdrive($drive,$unc,$persistent) endif else $rc=displaytext('Network connection type '+$NETWORKCONNECTION+' not authorized to map drive letter '+$drive+' to '+$unc) endif endif endif endif next return
[ 30. June 2003, 23:15: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 675 anonymous users online.
|
|
|