Valid for versions 100 through the latest version
Last modified: July 28, 2022
Overview
This script creates a new cPanel account.
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]
- 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 usernames@exampless.com y EN y 10
Options
Use the following options with this script:
Options | Description | Example |
---|---|---|
domain |
Required. The accounts main domain. |
example.com |
user or username |
Required. The new accounts username. cPanel usernames must adhere to the following criteria:
|
username |
pass or password |
Required. The accounts password. |
luggage123456 |
bwlimit |
The accounts maximum bandwidth.
unlimited . |
0 |
cgi |
Whether the account has CGI access.
|
y |
quota |
The accounts disk space quota.
0 (unlimited). |
0 |
cpmod |
The accounts cPanel theme. This value defaults to the servers 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 accounts maximum number of FTP accounts.
unlimited . |
0 |
maxsql |
The accounts 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 accounts maximum number of email addresses.
unlimited . |
0 |
maxlst |
The accounts maximum number of Mailman mailing lists.
unlimited . |
0 |
maxsub |
The accounts 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 accounts 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 accounts maximum number of parked domains (aliases).
|
unlimited |
maxaddon |
The accounts maximum number of addon domains.
|
unlimited |
featurelist |
The accounts assigned feature list. This value defaults to the selected packages Feature List value. |
default |
contactemail |
The accounts contact email address. This value defaults to an empty string value. |
username@example.com |
use_registered_nameservers |
Whether to use the domains registered nameservers instead of the servers nameservers.
n . |
n |
language |
The accounts 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 |