#29577 - 2002-09-25 03:09 AM
@PRIMARYGROUP
|
mjoni
Fresh Scripter
Registered: 2002-05-11
Posts: 13
|
When would you use this? I can't find any helpful information about what a primary group is used for. Any enlightenment will be appreciated!
|
Top
|
|
|
|
#29579 - 2002-09-25 03:20 AM
Re: @PRIMARYGROUP
|
mjoni
Fresh Scripter
Registered: 2002-05-11
Posts: 13
|
There must be a documented reason for offering this in Windows or a guideline for its use. I read a bit about it being offered for compatibility with non-Windows operating systems, but nothing definitive. I was hoping someone here had some insight they could share.
Thanks!
|
Top
|
|
|
|
#29582 - 2002-09-25 10:29 PM
Re: @PRIMARYGROUP
|
Jummo
Lurker
Registered: 2002-09-25
Posts: 3
|
I'm using it right now to use different network mappings depending on the user.
Working on an education system, and the teacher has different mappings than the students.
The students are in "klasse(a-j)" so I find it useful here:
if(INSTR(@PRIMARYGROUP, "klasse") USE x: "\\@LServer\@userid" USE q: "\\@LServer\sdbdata" USE k: "\\@LServer\@PRIMARYGROUP" USE s: "\\@LServer\skolen" else if @Ingroup("laerere") USE x: "\\@LServer\@userid" USE q: "\\@LServer\sdbdata" USE p: "\\@LServer\klasser" USE s: "\\@LServer\skolen" USE t: "\\@LServer\data" USE l: "\\@LServer\brugere" endif
Though Iīm having problems getting the RPC to work.....
|
Top
|
|
|
|
#29584 - 2002-09-25 11:20 PM
Re: @PRIMARYGROUP
|
Jummo
Lurker
Registered: 2002-09-25
Posts: 3
|
The reason I did primarygroup was that I have several classe, "klasse" with the ending a-j or something.
I could create a global group "klasse", but I did this "primary group" instead. Because all the users in a certain klasse has that klasse as their primary group. And I havenīt got wildcards to work with INGROUP("klasse*")..
RPC is working now, just forgot to start it hehe.
And I had a lot of syntax errors in the posted example. Is being corrected at the moment
|
Top
|
|
|
|
#29586 - 2002-09-26 04:56 PM
Re: @PRIMARYGROUP
|
Jummo
Lurker
Registered: 2002-09-25
Posts: 3
|
I solved it in another way:
DIM $group Select Case Ingroup("klassea") and not ingroup("laerere") ? $group = "klassea" Case Ingroup("klasseb") and not ingroup("laerere") ? $group = "klasseb" Case Ingroup("klasseb") and not ingroup("laerere") ? $group = "klassec" Case Ingroup("klassed") and not ingroup("laerere") ? $group = "klassed" Case Ingroup("klassee") and not ingroup("laerere") ? $group = "klassee" Case Ingroup("klassef") and not ingroup("laerere") ? $group = "klassef" Case Ingroup("klasseg") and not ingroup("laerere") ? $group = "klasseg" Case Ingroup("klasseh") and not ingroup("laerere") ? $group = "klasseh" Case Ingroup("klassei") and not ingroup("laerere") ? $group = "klassei" Case Ingroup("klassej") and not ingroup("laerere") ? $group = "klassej" Case Ingroup("laerer") ? $group = "laerer" endselect ; Map Drives to the logon Server, change @LServer with \\terminalsrv if you use that. ;If it is a student, map k: to the correct klasse folder. if INSTR($Group, "klasse") USE x: "@LServer\@userid" USE q: "@LServer\sdbdata" USE k: "@LServer\$Group" USE s: "@LServer\skolen" else ;If itīs a teacher, we use different mappings if Ingroup("laerere") USE x: "@LServer\@userid" USE q: "@LServer\sdbdata" USE p: "@LServer\klasser" USE s: "@LServer\skolen" USE t: "@LServer\data" USE l: "@LServer\brugere" endif
|
Top
|
|
|
|
#29587 - 2002-09-26 05:21 PM
Re: @PRIMARYGROUP
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
put this in front: Case Ingroup("laerer")
and you will not need the: ...and not Ingroup("laerer")
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 515 anonymous users online.
|
|
|