AD linking > packet groups

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
ryoken95
Messages: 28
Registered: December 23, 2015 - 11:09

December 24, 2015 - 2:07 PM

Thanks for your reply,

this tip works very well :)

but doesn't rely on Active Directory. :(
Floflobel
Messages: 135
Registration: Oct 15, 2015 - 5:32 p.m.

December 26, 2015 - 3:27 PM

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 ;) !
zeyf
Messages: 6
Registered: July 21, 2015 - 12:44

December 30, 2015 - 4:50 PM

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
Floflobel
Messages: 135
Registration: Oct 15, 2015 - 5:32 p.m.

December 31, 2015 - 1:09 PM

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,
Daniel Traversa
Messages: 16
Registration: February 21, 2017 - 2:26 PM

February 21, 2017 - 2:41 PM

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.
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

February 22, 2017 - 09:27

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
Tranquil IT
Daniel Traversa
Messages: 16
Registration: February 21, 2017 - 2:26 PM

February 22, 2017 - 2:29 PM

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.
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

February 22, 2017 - 7:05 PM

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
Tranquil IT
Daniel Traversa
Messages: 16
Registration: February 21, 2017 - 2:26 PM

February 24, 2017 - 09:25

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.
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

February 24, 2017 - 9:45 AM

This fix is ​​obviously included in the following updates...
https://github.com/tranquilit/WAPT/comm ... 4ad1c1dcb1
Tranquil IT
Locked