Page 1 of 1 1
Topic Options
#205530 - 2012-08-03 07:15 PM Multiple Login Groups
TimFromCVille Offline
Just in Town

Registered: 2012-08-02
Posts: 2
Loc: Virginia
Hi All,

I've been searching around a bit and I am not entirely sure what the command is that I am looking for here. I will try and describe what I am hoping to accomplish. This is my first time tinkering with Kix so I am VERY green.

Currently, we have AD Login groups that we use Kix to map the drives for users. Kix is seaparted out so logingroupxxx gets a corresponding script. We just had a reorganization and login groups are all out of whack.

We have users that need to switch scripts but keep certain drives from their old script. Is there anyway to do that with just adding if statements to what we have already or do I need to make new groups all together?

Our scripts look something like this:
 Code:
Case INGROUP("LOGINSYSOPS")
    USE O: /delete /persistent
    USE N: /delete /persistent
    USE M: "\\DFS\Share"
    USE N: "\\DFS\Share"
    USE O: "\\DFS\Share"
    USE P: "\\DFS\ShareC"
    USE T: "\\DFS\Share"
    USE X: "\\DFS\Share"   


What I would like to happen is have it check for another group as well, so run the above and then
If InGroup("additionalgroup")
use Z: "\\DFS\Share"
EndIf

If the only way to accomplish it is to make a new gorup all together then that is what I will do, we were just talking about stream lining this a bit more so given AD groups get given mapped drives universally. Unfortunately, we had almost everything organized by department and the majority of those departments no longer exist after the organizational changes so we want to implement a more long term fix.

Top
#205531 - 2012-08-03 07:35 PM Re: Multiple Login Groups [Re: TimFromCVille]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
The below code should work in theory. The problem is with the way that SELECT/CASE statements work. It only seeks 1 condition to be met then it will skip to the end.
SO...if say there is a case statement ahead of 'LOGINSYSOPS' that checks for 'additionalgroup' then it will never reach this one. Does that make sense? I've always preferred just using IF statements, and avoiding CASE statements all together. But it just depends on the environment.

 Code:
Case INGROUP("LOGINSYSOPS")
    USE O: /delete /persistent
    USE N: /delete /persistent
    USE M: "\\DFS\Share"
    USE N: "\\DFS\Share"
    USE O: "\\DFS\Share"
    USE P: "\\DFS\ShareC"
    USE T: "\\DFS\Share"
    USE X: "\\DFS\Share"
    If InGroup("additionalgroup")
        use Z: "\\DFS\Share"
    EndIf

Top
#205532 - 2012-08-03 10:32 PM Re: Multiple Login Groups [Re: ShaneEP]
TimFromCVille Offline
Just in Town

Registered: 2012-08-02
Posts: 2
Loc: Virginia
I guess I was almost there the entire time. I had another script that I was trying to model it after and they were using MultipleGroupListing as the command but I could not confirm if it actually worked.

Thank you for the help, it worked like a charm.

Top
#205541 - 2012-08-06 01:47 PM Re: Multiple Login Groups [Re: TimFromCVille]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Just an FYI - this is where our Universal Login Script is very strong..

You can specify a list of groups with modifiers to control access to a resource, in this case, the Z: drive. Here are a couple of example group configurations for Group Authorizations
 Code:
GROUPS=group1,Group2           ; Map if member of any group
GROUPS=+,group1,Group2         ; Map if a member of ALL groups
GROUPS=+,group1,!Group2        ; Map if a member of of Group1 and Not Group2
GROUPS=+,Group2!               ; Map for all, but DO NOT Map if a member of Group2
These options are supplemented by User OU, Computer OU, Subnet, Site, and User-specific authorization logic. Many of these can be combined with Value Rewrite, so you can replace a subnet, OU, ComputerOU, or UserID with all or part of a UNC path. For example, you might have 50 departments in Division 1, each in a unique OU. Rather than creating 50 IF or CASE statements, you create one resource, with the resource path like this:
PATH=&OU:DeptLookup&

This tells the script to obtain the User's OU, use it to lookup the path to be mapped from the table called "DeptLookup".
In the DeptLookup section, you simply write
 Code:
Dept1=\\server1\share1
Dept2=\\server1\share2
:
Dept50=\\server3\share18
where "Dept##" is the OU name of each department. The huge advantage of this is that as departements are added or removed, you simply update the lookup table - no more coding, eliminating potential login script problems that can affect the entire company.

This Kix-based script can be downloaded for free with a full user manual and configuration examples from our web site.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

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 793 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.097 seconds in which 0.052 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org