[Kde-kiosk] Problem with Applying Group Profiles to new Users

Murray Trainer mtrainer at central-data.net
Thu Jan 20 15:36:55 CET 2005


Martijn Klingens wrote:

>Interesting to see the same output twice...
>
>On Thursday 20 January 2005 00:28, Murray Trainer wrote:
>  
>
>>>       if (strcmp(member, user) == 0)
>>>           printf( "User is in group 'external'\n" );
>>>       else
>>>           printf( "User is *NOT* in group 'external'!\n" );
>>>      
>>>
>
>What happens if you change this to
>
>  
>
>>>       if (strcmp(member, user) == 0)
>>>           printf( "User %s is in group 'external'\n", member );
>>>       else
>>>           printf( "User %s is *NOT* in group 'external'!\n", member );
>>>      
>>>
>
>?
>
>  
>
Removed mtrainer from external group and added gls

Output from ldap slapcat command for external group  - correct

dn: cn=external,ou=groups,dc=central-data,dc=net
objectClass: posixGroup
entryUUID: c88df1f6-d888-1028-9f75-fb03c06a32ce
creatorsName: cn=Manager,dc=central-data,dc=net
createTimestamp: 20041202083453Z
gidNumber: 500
cn: external
userPassword:
memberUid: demo
memberUid: local
memberUid: local2
memberUid: gls
entryCSN: 20050120140227Z#000001#00#000000
modifiersName: cn=Manager,dc=central-data,dc=net
modifyTimestamp: 20050120140227Z

Output from groups command - correct

ldap:/tmp/mt # groups demo local local2 mtrainer gls
demo : users Domain Users external
local : users uucp dialout audio video external
local2 : users uucp dialout audio video external
mtrainer : users Domain Users
gls : users Domain Users external

Output from test program - WRONG! - still has old group members

ldap:/tmp/mt # ./test
User demo is *NOT* in group 'external'!
User local is *NOT* in group 'external'!
User local2 is *NOT* in group 'external'!
User mtrainer is *NOT* in group 'external'!

Not sure why your strcmp is not working but something is either wrong 
with your code or the system call.  The results from the test program 
above exhibit the same behaviour as the kiosk-tool.  I have noticed that 
eventually the profile does work for the new user but I am not sure what 
makes that happen.  Also once they have the profile working and I remove 
them from the group the profile still applies.  As you can see, the 
mtrainer user is not in the external group but your code thinks it still 
is.  Its some sort of lag effect for ldap users.   The groups command 
seems to work OK with LDAP users.  Maybe you need to look at the code 
for that and compare it with the code you have in the Kiosk-tool. 

Thanks for your persistence with this - I think we are close to nailing 
down the problem.

Murray








More information about the kde-kiosk mailing list