create-domain, run as non root


I want to create a script which can create a domain / virtual host in Virtualmin, using:

virtualmin create-domain --domain --pass smeg --desc “The server for foo” --unix --dir --webmin --web --dns --mail --limits-from-plan


However, I want to run this script from a web page, i.e. running as apache (e.g. www-data) user.

I’m aware of the security risks and have methods in place to mitigate these, so my question is, can I change the virtualmin config to allow create-domain to be run from a non root user (or, just indeed add a specific user, such as www-data to be able to run the command).

Thanks in advance


Just following up on this – any thoughts? Even if it’s a confirmed / guaranteed no there’s no solution?