Explains how to use the command-line scripts included with Virtualmin to manage users, aliases, servers, databases and resellers.

Introduction

Virtualmin comes with several programs that can be run from the Unix command line to perform actions that are usually done from the web interface. In fact, almost all actions that can be done in a browser can also be done from the command line, or from shell scripts. This allows virtual server, user and alias creation and management to be done in a more automated function, such as from programs or scripts of your own creation.

All of these commands can be found in the directory /usr/libexec/webmin/virtual-server . They must all be run as the root Unix user, as they need access to system configuration files to create users, set up web sites and so on. If you want to create servers, users and aliases programatically as a different user (such as from your own CGI scripts), see the documentation on the Virtualmin Remote API instead.

All of the programs that make changes to the system output messages indicating their success or failure. Their exit status can also be checked to determine success - an exit status of 0 indicates that everything went OK, while a non-zero status indicates some problem.

All programs can be called with the --help command-line parameter to have them output details of the required and allowed parameters. Most require one or more parameters, to specify such things as the domain name of the virtual server to create, or the name for a new user. All parameters need to have -- before the option name, such as --domain foo.com .

Command Categories

API commands are broken down into the following categories :