I have LDAP Users and Groups working properly, except that automatic group creation doesn’t work on creating new users (see my post in the Webmin Questions forum).
I went ahead an enabled Virtualmin to store users and groups in LDAP. I went to test it by creating a new account. I created the domain "mydomain.tld", Description "Test User", and Administrator Password "testing". I got the following output:
Creating home directory …
… done
Creating administration group mydomain …
… done
Creating administration user mydomain …
… done
Failed to create virtual server : Failed to modify group in LDAP database : No DN specified
Seems as though Virtualmin isn’t respecting the settings of LDAP Users and Groups. Am I missing something there?
You have one more bug to toss in there too. Manual user creation dies because it expects the group to exist, despite having set to automatically create it for you. Batch jobs work fine, and after removed the deniedssh group, Virtualmin-created users seem to work fine too.
The error, btw, is in the ldap-useradmin localization file as gsave_emod. It is listed in the function ldap-useradmin::modify_group(&oldgroup, &newgroup);
per the comments, although passing subs as arguments is a bit puzzling…?
Here’s the code snippet:
modify_group(&oldgroup, &newgroup)
sub modify_group
{
local $ldap = &ldap_connect();
local $base = &get_group_base();
local @attrs = &group_to_dn($[[1]]);
push(@attrs, @{$[[0]]->{‘ldap_attrs’}});
local $rv = $ldap->modify($_[[0]]->{‘dn’}, replace => { @attrs });
if ($rv->code) {
&error(&text(‘gsave_emod’, $rv->error));
}
It gets called out of the virtual server module like this: