I have a user script that I’m developing a virtualmin management interface for. I’d like to create virtual-servers using passwords that are already stored in my user script as md5 hashes. I know I can create mail/ftp users this way but I was curious as to creating the virtual server with that password also.
IE customer signs up wants to purchase hosting/purchases the hosting package I can then migrate the md5 password and username from the database to the remote api call to create a virtual server. Otherwise I would need to request a password from my user before creating the account but it seems somewhat in bad form and not as integrated as I would like.
something like this virtualmin create-domain --domain something.tld --pass md5 hash here --user username from script --plan “Business”
Is this possible in some way? or would I need to change my user script to use some sort of encryption system so that it can decrypt their password to do the creation? IE have open_ssl encrypted password’s stored in the db and on create simply un-encrypt that value to place in the --pass command switch.
This second method worries me somewhat as it is much more prone to insecurity than simply importing a pre-exististing md5 because now it is susceptible to an attack if somebody we’re to gain db access they might be able to decrypt the password and gain access to my user accounts.