Page 1 of 1 1
Topic Options
#29577 - 2002-09-25 03:09 AM @PRIMARYGROUP
mjoni Offline
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
#29578 - 2002-09-25 03:13 AM Re: @PRIMARYGROUP
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The macro simply returns the primary group you assign in User Manager. What you do with it is up to you.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#29579 - 2002-09-25 03:20 AM Re: @PRIMARYGROUP
mjoni Offline
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
#29580 - 2002-09-25 03:36 AM Re: @PRIMARYGROUP
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
I believe that on NT domains the primary group is something that is assigned & assignable for all users in the domain. As Les says, it's part of the domain definition of users & what you want to use it for is up to you. Personally, I have never seen a need to use it but in big complex organizations it could be more relevant. After all a user could be a member of multiple groups & distinguishing what's the users primary group might be relevant.

This is not a kixtart issue - it is an MS domain server issue.

[ 25. September 2002, 03:37: Message edited by: Jack Lothian ]
_________________________
Jack

Top
#29581 - 2002-09-25 02:46 PM Re: @PRIMARYGROUP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
This is the group a new domain user is assigned to by default. By default, the primary group is 'Domain Users' but that can be changed. And, IIRC, a domain user has be a member of at least one group, which is then the primary group for that user.
_________________________
There are two types of vessels, submarines and targets.

Top
#29582 - 2002-09-25 10:29 PM Re: @PRIMARYGROUP
Jummo Offline
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
#29583 - 2002-09-25 10:32 PM Re: @PRIMARYGROUP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You don't need to use the primary group for this. You can also map based on any group membership by using INGROUP. This is also more granular since a user can only be a member of one primary group.

What do you mean with 'getting the RPC' to work? Are you supporting Windows 9x? Then please read the approrpiate seciton in the FAQ Froum and the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#29584 - 2002-09-25 11:20 PM Re: @PRIMARYGROUP
Jummo Offline
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
#29585 - 2002-09-26 01:25 AM Re: @PRIMARYGROUP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
INGROUP can accept an array of groupnames since KiXtart 4.11.
_________________________
There are two types of vessels, submarines and targets.

Top
#29586 - 2002-09-26 04:56 PM Re: @PRIMARYGROUP
Jummo Offline
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 Offline
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")
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 1 1


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

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

Generated in 0.061 seconds in which 0.022 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