Page 1 of 1 1
Topic Options
#206209 - 2012-11-13 11:28 AM help, how to solve this problem
marconylacerda Offline
Just in Town

Registered: 2012-11-09
Posts: 1
Loc: pernambuco-Brazil
I'm having trouble with a script written in kix, and the problems that a User belongs to more than one group in AD it is doing only a single mapping, using that criterion does not know it to see the example below:

 Code:
CLS
Color W+                  
at (02,08) "Ola, "+@userid+" , Bem-vindo a Rede SEPLAG"
at (04,08) "Aguarde. Definindo os Parametros de Sua Conexao !!!"
sleep 1                        
small
Color b+/n
BOX (0,0,24,79,SINGLE)           
Color b/n
BOX (8,06,21,70,SINGLE)              
Color g+/n
Color w+/n
AT (10,08) "Usuário           : "    
AT (11,08) "Nome              : "
AT (12,08) "Privilégio        : "
AT (13,08) "Estação           : "
AT (14,08) "Dominio           : "
AT (15,08) "Servidor de Logon : "
at (16,08) "Hora              : "
at (17,08) "Data              : "
Color y+/n
AT (10,28) @userid              
AT (11,28) @fullname   
AT (12,28) @priv
AT (13,28) @wksta
AT (14,28) @domain
AT (15,28) @lserver
AT (16,28) @time
AT (17,28) ""+@mdayno+"/"+@monthno+"/"+@year
Color y+/n
AT (19,08) "Aguarde, Gravando os Parametros de Sua Conexão ...!"
sleep 3
if ingroup("Domain Users")
   USE Y: "\\SRVSUPORTE\PUBLIC" /PERSISTENT
endif
if ingroup("LEXCOLOR2")
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\L-SECEXEC")
endif
if ingroup("ACESSO_LEX_2ANDAR")
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\L-SGTG")
endif
if ingroup("QLIKVIEW_ADM")
   USE P: "\\SRV-QLIK\apl" 
endif
if ingroup("FINANCEIRO")
   USE X: "\\SRVARQ01\FINANCIAL"
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\X-FINAN")
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\X-FINAN2")
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\X-PROTOC")
   SETDEFAULTPRINTER ("\\SRV-IMP2.SEPLAG.LOCAL\X-FINAN")
endif
if ingroup("FINANCIAL2")
    USE T: "\\SRVARQ01\REJANE"
    USE W: "\\SRVARQ01\GRUPOS"  
    USE X: "\\SRVARQ01\FINANCIAL"
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\L-SGTG")
endif
if ingroup("ADMINISTRATIVO")
   USE X: "\\SRVARQ01\ADMINISTRATIVO"
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\X-SGTG")
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\X-PROTOC")
   SETDEFAULTPRINTER ("\\SRV-IMP2.SEPLAG.LOCAL\X-SGTG2")
endif
if ingroup("ADMINISTRATIVO2")
   USE W: "\\SRVARQ01\GRUPOS"
   USE X: "\\SRVARQ01\ADMINISTRATIVO"
   ADDPRINTERCONNECTION ("\\SRV-IMP2.SEPLAG.LOCAL\L-SGTG")
endif
EXIT


for example I have a User called john who both belong to the group QLIKVIEW_ADM when the group FINANCIAL because well as the User login to the network are mapped to the same:

 Code:
Y: "\ \ SRVSUPORTE \ PUBLIC" / PERSISTENT
USE X: "\ \ SRVARQ01 \ FINANCIAL"


when in fact beyond these should also be mapped
 Code:
USE P: "\ \ SRV-QLIK \ apl"


what should it be and how to solve


Edited by Mart (2012-11-13 12:17 PM)
Edit Reason: Please user code tags when posting code.

Top
#206210 - 2012-11-13 01:07 PM Re: help, how to solve this problem [Re: marconylacerda]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Welcome to KORG!

I'd start by adding some debug messages to your script. Right after the Sleep 3 line, add
 Code:
Del '%USERPROFILE%\debug.log'                     ; start with a fresh file
$Rc = RedirectOutput('%USERPROFILE%\debug.log')
@DATE ' - ' @TIME ?
Then, after each InGroup() test, add
 Code:
@USERID ': member of group xxxx' ?
This will at least verify that Kix is recognizing group memberships. Also, start the script once with "kix32 -f" to flush the token (group membership) cache.

Let us know what you find.

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 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

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