Zimbra integration

Hi to all,

I’m trying to do with the pre/post script modification script of virtualmin to integrate Zimbra with Virtualmin.
The script I’m using is retrieving data from VIRTUALSERVER_ variables.
Now the first problem: when creating the domain, I need the password for the user to set the same password for the admin account of the domain.

Where I can find the PLAINPASS variable? Or, how can I set a variable with the same password (not encrypted)?

Thanks to all

I’m not exactly sure how Virtualmin stores passwords, but I’m pretty sure they’re stored hashed using either MD5 or SHA1. As a result, the password is never stored in the clear and cannot be retrieved.

I’d find out what the software you’re looking to integrate uses to hash passwords and compare it with Virtualmin’s method - if they’re the same, you’re in business. Simply copy over the value Virtualmin has stored. However, if they’re different, I don’t know what to recommend - it’s not like there’s a (trivial) way to convert a hash from one format to another.

Of course, I could be completely wrong and Virtualmin does encrypt passwords instead of hashing them (relatively unsafe since it’s reversible, but better then storing them in the clear), in which case you need to get the encryption key Virtualmin uses, decrypt the password, then store it however the software you’re looking to integrate stores passwords (hashing with salted SHA1 is preferred).

I really hope Virtualmin doesn’t store cleartext passwords. If it does, the solution is to ABANDON SHIP.

I’ve found that in the template section you can choose how Virtualmin store the password: md5, sha or plaintext.
Unfortunately, there is no way to put the password in plain as a variable only during pre/post script: I think that it can be a feature, so I’ll try to open a feature request.

With password in plaintext, during the pre/post domain script, I can syncronize stuff with zimbra without problems.