create-user

Create a mail, FTP or database user.

This program adds a new user to an existing virtual server. It is typically called with parameters like:

  virtualmin create-user --domain foo.com --user jimmy --pass smeg --quota 1024 --real "Jimmy Smith"

This command would add a user to the server foo.com named jimmy with password smeg and a disk quota of 1MB. The actual POP3 and FTP username may end up as jimmy.foo, depending on whether or not domain suffix are always appended to usernames, and what suffix format is used.

The --ftp option can be used to give the new user an FTP login as well - by default, he will only be given an email account. The --noemail option turns off the default email account, which is useful for creating FTP or database-only users.

Extra email addresses for the new user can be specified with the --extra option, followed by an email address within the virtual server. This option can be given multiple times if you wish.

The new user can be granted access to MySQL databases associated with the virtual server with the --mysql option, which must be followed by a database name. This option can occur multiple times in order to grant access to more than one database. Unfortunately, there is no way to grant access to PostgreSQL databases.

To create a user who has only FTP access to the domain's website, use the --web flag. To turn off spam checking for the new user, include --no-check-spam on the command line. To add the user to additional secondary Unix groups, the --group flag followed by a group name can be given multiple times.

For more control over the user's login abilities (FTP, SSH or email only), use the --shell parameter followed by a full path to a Unix shell, such as /usr/bin/scponly. Available shells can be displayed using the list-available-shells command.

If you only have a pre-encrypted password that you want the new user to use, the --encpass flag can be used to set it instead of --pass. However, this will prevent Virtualmin from enabling MySQL access for the user, as it needs to know the plaintext password to re-hash it for MySQL.

Command Line Help

virtualmin create-user --domain domain.name
                       --user new-username
                       --pass password-for-new-user |
                       --encpass encrypted-password |
                       --random-pass |
                       --passfile password-file
                      [--quota quota-in-blocks|"UNLIMITED"]
                      [--real real-name-for-new-user]
                      [--ftp]
                      [--shell /path/to/shell]
                      [--noemail]
                      [--extra email.address@some.domain]
                      [--mysql db]*
                      [--group name]*
                      [--web]
                      [--no-check-spam]
                      [--no-creation-mail]
                      [--home directory]