The wwwacct Script
Valid for versions 100 through the latest version
Version:
100
Last modified: July 28, 2022
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]
Note:
- You must specify all options in the following order. If you do not include all options, the script may apply values to incorrect options and will set the remaining options to default values.
/usr/local/cpanel/scripts/wwwacct <domain> <user> <pass> <quota> <cpmod[advanced/?]> <ip[y/n]> <cgi[y/n]> <frontpage[always n]> <maxftp> <maxsql> <maxpop> <maxlst> <maxsub> <bwlimit> <hasshell[y]/[n]> <owner> <plan> <maxpark> <maxaddon> <featurelist> <contactemail> <use_registered_nameservers> <language> <spamassassin[Y/n]> <max_emailacct_quota> <spambox[Y/n]>
Example
The following example creates an account with the values shown in the screenshot below.
/usr/local/cpanel/scripts/wwwacct example.com username luggage123456 123 jupiter n n n unlimited 4 6 8 10 unlimited n root default 10 10 default [email protected] y EN y 10
Options
Use the following options with this script:
Options | Description | Example |
---|---|---|
domain |
Required. The account’s main domain. | example.com |
user or username |
Required. The new account’s username. cPanel usernames must adhere to the following criteria:
|
username |
pass or password |
Required. The account’s password. | luggage123456 |
bwlimit |
The account’s maximum bandwidth.
unlimited . |
0 |
cgi |
Whether the account has CGI access.
|
y |
quota |
The account’s disk space quota.
0 (unlimited). |
0 |
cpmod |
The account’s cPanel theme. This value defaults to the server’s default Theme setting. |
jupiter |
ip |
Whether the account has a dedicated IP address.
n . |
n |
frontpage |
Whether Microsoft® FrontPage® Extensions exist on the account.
Important:
This option is deprecated. cPanel & WHM ignores all FrontPage settings.
|
n |
maxftp |
The account’s maximum number of FTP accounts.
unlimited . |
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.
unlimited . |
0 |
maxpop |
The account’s maximum number of email addresses.
unlimited . |
0 |
maxlst |
The account’s maximum number of Mailman mailing lists.
unlimited . |
0 |
maxsub |
The account’s maximum number of subdomains.
unlimited . |
0 |
hasshell |
Whether the account has shell (SSH) access.
|
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.
|
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.
default hosting plan. |
default |
maxpark |
The account’s maximum number of parked domains (aliases).
|
unlimited |
maxaddon |
The account’s maximum number of addon domains.
|
unlimited |
featurelist |
The account’s assigned feature list. This value defaults to the selected package’s Feature List value. |
default |
contactemail |
The account’s contact email address. This value defaults to an empty string value. |
[email protected] |
use_registered_nameservers |
Whether to use the domain’s registered nameservers instead of the server’s nameservers.
n . |
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.
|
EN |
spamassassin |
Whether Apache SpamAssassin™ is enabled on the account.
y . |
y |
spambox |
Whether to enable spam box filtering on the account.
y .
Important:
You must enable Apache SpamAssassin if you use this option.
|
y |
max_emailacct_quota |
The maximum email quota size, in megabytes (MB), that the account can define when it creates an email account.
Important:
|
unlimited |