Page 1 of 1 1
Topic Options
#48359 - 1999-10-18 10:51 AM Mapping drives for users within different groups
Anonymous
Unregistered


I'm new to kixtart and I am trying to map drives to different groups of users. I tried using this code below but I never get a drive map:
; ============== Mappings for everyone =========================================

; homedirectory \\HQRTS-EASTERN\alxnvawz001\username
$server = "\\alxnvawz001"
$user=@userid

use g: "$server\test"
use t: "$server\public"
use f: "$server\images"


; ============== Mappings for Groupmembers ===========================


$ingroup="support"
$newdrive="H"
$share="users"
if ingroup($ingroup)
; connect, also if there was another drivemapping (overwrite)
use $newdrive: "$server\$share"
else
; delete possible mapping for non-members of group
; (if wanted)
if exist ("$newdrive:\null")
use $newdrive: /delete
endif
endif


$ingroup="ccmail"
$newdrive="S"
$share="admin"
if ingroup($ingroup)
; connect, also if there was another drivemapping (overwrite)
use $newdrive: "$server\$share"
else
; delete possible mapping for non-members of group
; (if wanted)
use $newdrive: /delete
if exist ("$newdrive:\nul")
use $newdrive: /d
endif
endif

use list

Top
#48360 - 1999-10-19 02:08 AM Re: Mapping drives for users within different groups
Anonymous
Unregistered


I use the following which works fine for my NT network:

;*******************************************
; Administrators
;*******************************************

$r = InGroup("Administrators")
If $r > 0
? "-> InGroup Administrators " ?

if exist ( "X:\" )
use X: /del
endif

use x: \\SERVER1\NT /persistent:no

EndIf

;*******************************************
; Managers
;*******************************************

$r = InGroup("Managers")
If $r > 0
? "-> Managers "

if exist ( "i:\" )
use i: /del
endif

if exist ( "J:\" )
use J: /del
endif

if exist ( "S:\" )
use S: /del
endif

use I: \\SERVER2\CXP /persistent:no
use J: \\SERVER2\EFF /persistent:no
use S: \\SERVER2\Managers /persistent:no

EndIf

Top
Page 1 of 1 1


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

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.048 seconds in which 0.024 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