Why is sssd->groupDN null?

Working further on my LLNG module, and I’m making good progress getting it working with AD, but I’m running into an oddity. My test server is set up with local AD. On the Users & Groups page in Cockpit, it shows, inter alia, a Group DN:
image

So in my template, I try to extract that value like this:

if (${sssd}{Provider} eq "ad") {
	use NethServer::SSSD; 
	my $sssd = new NethServer::SSSD();
	my $baseDN = $sssd->baseDN();
	my $bindDN = $sssd->bindDN();
	my $bindPassword = $sssd->bindPassword();
	my $ldapURI = $sssd->ldapURI();
	my $groupDN = $sssd->groupDN();

But when I then try to use $groupDN in my template, it’s blank. A quick workaround is to use the Base DN, since at least in this context the values are the same–but this doesn’t seem like the expected behavior. Am I missing something here?

1 Like

The code implementation is straightforward

I’m not a Perl programmer nowadays and I can’t remember the difference (if any exists) between new Something() and Something->new()

Yesterday, it wasn’t working for me. Now, it is. Strange, but I’ll chalk it up to user error for now.