#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
|
0 registered
and 811 anonymous users online.
|
|
|