#1488001 closed Bugs (invalid)

Password plugin and Virtualmin not working as expected

Reported by: mfierro Owned by:
Priority: 5 Milestone: later
Component: Plugins Version: 0.5.2
Severity: normal Keywords: password, virtualmin
Cc:

Description (last modified by alec)

Hello,
I believe that the Password plugin is not working as expected with Virtualmin (at least it did not for me).

In particular, it seems that it would almost always compute the wrong domain parameter to be passed to the command line.

Problem

  • Virtualmin hosting domain mydomain.com
  • Usernames are in the form username.mydomain

The plugin retrieves the domain from the username (in my case the second token after the dot, as per configuration options) and executes the following command

chgvirtualminpasswd modify-user --domain mydomain --user username.mydomain

The correct command should be

chgvirtualminpasswd modify-user --domain mydomain.com --user username.mydomain

Proposed solution

I solved the problem by retrieving the domain name from the IMAP host, i.e. in file drivers/virtualmin.php

$domain   = $_SESSION['imap_host'];

This should work for any username configuration, and not just the one I am using.

Change History (2)

comment:1 Changed 15 months ago by alec

Did you try with password_virtualmin_format=2 ?

comment:2 Changed 12 months ago by alec

  • Description modified (diff)
  • Resolution set to invalid
  • Status changed from new to closed

No feedback.

Note: See TracTickets for help on using tickets.