Page 2 of 3

Re: AD linking > packet groups

Published: Dec 24, 2015 - 2:07 PM
by ryoken95
Thanks for your reply,

this tip works very well :)

but doesn't rely on Active Directory. :(

Re: AD linking > packet groups

Published: Dec 26, 2015 - 3:27 PM
by Floflobel
First, you need to assign a group to the computer with the same name as on WAPT. Run the console with an admin account on the domain that has access to groups, etc.
Then repeat the procedure I described earlier.

Don't hesitate to ask if you need help ;) !

Re: AD linking > packet groups

Published: Dec 30, 2015 - 4:50 PM
by zeyf
Hello and thank you for your reply, Floflobel.

I'm not sure I fully understand your solution.
I created a WAPT group and added my machine to it to avoid the known bug.
Once in the group, I tried to add it to the AD groups.
Is there something I've misunderstood in your post?

I don't currently have a WAPT server installed.
But if I find a solution to the problem, it might still be possible to try this approach again.

So, I'm waiting for your feedback to see if it's worth testing again.

Sincerely,
Zeyf

Re: AD linking > packet groups

Published: Dec 31, 2015 - 1:09 PM
by Floflobel
Hello,

my procedure probably seems strange to you, but it actually works perfectly.
If I don't assign a "dummy" group to it first, the relationship with Active Directory doesn't work.

Make sure you create the group on Active Directory and assign it to the PC in question.

Regards,

Re: AD linking > packet groups

Published: February 21, 2017 - 2:41 PM
by Daniel Traversa
Hello,

I'm also having the same problem...
my machines are all members of the "default" group (without packages) in the WAPT console.
I created a waptcommun group (with 2 test packages) and I created the waptcommun group in Active Directory with my machines as members.
When I right-click on a machine in the console and then select "Add AD groups as package dependencies," the result is 0 machines modified.

Can you help me?
v. 1.3.9.0

Thank you.

Re: AD linking > packet groups

Published: February 22, 2017 - 09:27
by htouvet
Perhaps it's due to a bug if there's only one group.

Could you try modifying the file c:\wapt\waptdevutils.py by replacing the get_computer_groups function with this one:

Code: Select all

def get_computer_groups(computername):
    """Try to finc the computer in the Active Directory
        and return the list of groups
    """
    groups = []
    computer = active_directory.find_computer(computername)
    if computer:
        computer_groups = computer.memberOf
        if computer_groups:
            if not isinstance(computer_groups,list):
                computer_groups = [computer_groups]
            for group in computer_groups:
                # extract first component of group's DN
                cn = group.split(',')[0].split('=')[1]
                groups.append(cn)
    return groups

Re: AD linking > packet groups

Published: February 22, 2017 - 2:29 PM
by Daniel Traversa
Hello,

I have two groups of workstations on my Active Directory.
When I change the function, I get a new error:
exceptions.AttributeError: 'tuple' object has no attribute 'split'.

Thank you.

Re: AD linking > packet groups

Published: February 22, 2017 - 7:05 PM
by htouvet
SO...

Code: Select all

def get_computer_groups(computername):
    """Try to finc the computer in the Active Directory
        and return the list of groups
    """
    groups = []
    computer = active_directory.find_computer(computername)
    if computer:
        computer_groups = computer.memberOf
        if computer_groups:
            if not isinstance(computer_groups,(list,tuple)):
                computer_groups = [computer_groups]
            for group in computer_groups:
                # extract first component of group's DN
                cn = group.split(',')[0].split('=')[1]
                groups.append(cn)
    return groups

Re: AD linking > packet groups

Published: February 24, 2017 - 9:25 AM
by Daniel Traversa
Yes, it works with this change!
Will this change be taken into account in future updates?
Or do I need to keep this information for manual modification?

Thank you.

Re: AD linking > packet groups

Published: February 24, 2017 - 9:45 AM
by htouvet
This fix is ​​obviously included in the following updates...
https://github.com/tranquilit/WAPT/comm ... 4ad1c1dcb1