The wwwacct Script

Valid for versions 100 through the latest version

Version:

82

100


Last modified: September 15, 2021

Overview

This script creates a new cPanel account.

Note:

You can also create an account with the WHM API 1 createacct function.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/wwwacct domain user pass [options]

Options

Use the following options with this script:

Options Description Example
domain Required.
The account’s main domain.
domain=example.com
user or username Required.
The new account’s username. cPanel usernames must adhere to the following criteria:
  • The first eight characters of a username must be unique.
  • A username cannot begin with a number or the test string.
user=username
pass or password Required.
The account’s password.
pass=luggage123456
bwlimit The account’s maximum bandwidth.
  • A positive integer.
  • 0, unlimited, or null — The account possesses unlimited bandwidth.
This value defaults to unlimited.
bwlimit=0
cgi Whether the account has CGI access.
  • y — CGI access enabled.
  • n — CGI access disabled.
cgi=y
quota The account’s disk space quota.
  • A positive integer.
  • 0 — The account’s disk space is unlimited.
This value defaults to 0 (unlimited).
quota=0
cpmod The account’s cPanel theme.

This value defaults to the server’s default Theme setting.
cpmod=jupiter
ip Whether the account has a dedicated IP address.
  • y — The account has a dedicated IP address.
  • n — The account does not have a dedicated IP address.
This value defaults to n.
ip=n
frontpage Whether Microsoft® FrontPage® Extensions exist on the account.
Important:
This option is deprecated. cPanel & WHM ignores all FrontPage settings.
frontpage=n
maxftp The account’s maximum number of FTP accounts.
  • A positive integer.
  • 0, unlimited, or null — The account can create unlimited FTP accounts.
This value defaults to unlimited.
maxftp=0
maxsql The account’s maximum number of each available type of SQL database. For example, this parameter has a 5 value and the system administrator allows MySQL® and PostgreSQL® databases. Users can create up to five MySQL databases and up to five PostgreSQL databases.
  • A positive integer.
  • 0, unlimited, or null — The account can create unlimited SQL databases.
This value defaults to unlimited.
maxsql=0
maxpop The account’s maximum number of email addresses.
  • A positive integer.
  • 0, unlimited, or null — The account can create unlimited email accounts.
This value defaults to unlimited.
maxpop=0
maxlst The account’s maximum number of Mailman mailing lists.
  • A positive integer.
  • 0, unlimited, or null — The account can create unlimited mailing lists.
This value defaults to unlimited.
maxlst=0
maxsub The account’s maximum number of subdomains.
  • A positive integer.
  • 0, unlimited, or null — The account can create unlimited subdomains.
This value defaults to unlimited.
maxsub=0
hasshell Whether the account has shell (SSH) access.
  • y — The account has shell access.
  • n — The account does not have shell access.
This value defaults to the default package’s Shell Access value.
hasshell=y
owner The root user or WHM reseller account that will own this account.
Important:
The authenticated user calling this script must have root privileges to assign the cPanel account owner to a reseller.
This value defaults to the authenticated user who runs the script.
owner=root
plan The account’s hosting plan (package).
Important:
If you use this option, do not use the quota-related options in this script. Instead, we recommend that you allow the assigned plan determine quotas.
This value defaults to the default hosting plan.
plan=default
maxpark The account’s maximum number of parked domains (aliases).
  • A positive integer.
  • unlimited — The account can use unlimited parked domains.
This value defaults to the selected package’s Maximum Parked Domains value.
maxpark=unlimited
maxaddon The account’s maximum number of addon domains.
  • A positive integer.
  • 0 or unlimited — The account can use unlimited addon domains.
This value defaults to the selected package’s Maximum Addon Domains value.
maxaddon=unlimited
featurelist The account’s assigned feature list.

This value defaults to the selected package’s Feature List value.
featurelist=default
contactemail The account’s contact email address.

This value defaults to an empty string value.
contactemail=username@example.com
forcedns Whether to overwrite an existing DNS zone with the new account’s information. The system performs this action if a matching DNS zone currently exists.
  • 1 — Overwrite an existing DNS zone.
  • 0 — Do not overwrite an existing DNS zone.
This value defaults to 0.
forcedns=1
useregns Whether to use the domain’s registered nameservers instead of the server’s nameservers.
  • y — Use the domain’s nameservers.
  • n — Use the server’s nameservers.
This value defaults to n.
useregns=n
language The account’s locale, in two-letter ISO-3166-1 code format. This value is case-sensitive.
Note:
For region-specific locales, use the ISO 639-1 code, an underscore (_), and the ISO 3166-1 code.
This value defaults to the selected package’s Locale value.
language=EN
spamassassin Whether Apache SpamAssassin™ is enabled on the account.
  • y — Enable SpamAssassin.
  • n — Disable SpamAssassin.
This value defaults to y.
spamassassin=y
spambox Whether to enable spam box filtering on the account.
  • y — Enable spam box filtering.
  • n — Disable spam box filtering.
This value defaults to y.
Important:
You must enable Apache SpamAssassin if you use this option.
spambox=y
max_emailacct_quota The maximum email quota size, in megabytes (MB), that the account can define when it creates an email account.
  • A positive integer.
  • 0 or unlimited — The account has an unlimited quota.
This value defaults to the selected package’s Max Quota per Email Address (MB) value.
Important:
  • This value applies to each email account, not each cPanel account.
  • If you call this option, it overwrites the hosting plan's defined value for the account.
  • We recommend that you let the account's defined hosting plan determine this option's value.
max_emailacct_quota=unlimited

Additional Documentation