The wwwacct Script

Valid for versions 100 through the latest version


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 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:
  • The first eight characters of a username must be unique.
  • A username cannot begin with a number or the test string.
username
pass or password Required.
The accounts password.
luggage123456
bwlimit The accounts maximum bandwidth.
  • A positive integer.
  • 0unlimited, or null  The account possesses unlimited bandwidth.
This value defaults to unlimited.
0
cgi Whether the account has CGI access.
  • y  CGI access enabled.
  • n  CGI access disabled.
y
quota The accounts disk space quota.
  • A positive integer.
  • 0  The accounts disk space is unlimited.
This value defaults to 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.
  • y  The account has a dedicated IP address.
  • n  The account does not have a dedicated IP address.
This value defaults to 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.
  • A positive integer.
  • 0unlimited, or null  The account can create unlimited FTP accounts.
This value defaults to 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.
  • A positive integer.
  • 0unlimited, or null  The account can create unlimited SQL databases.
This value defaults to unlimited.
0
maxpop The accounts maximum number of email addresses.
  • A positive integer.
  • 0unlimited, or null  The account can create unlimited email accounts.
This value defaults to unlimited.
0
maxlst The accounts maximum number of Mailman mailing lists.
  • A positive integer.
  • 0unlimited, or null  The account can create unlimited mailing lists.
This value defaults to unlimited.
0
maxsub The accounts maximum number of subdomains.
  • A positive integer.
  • 0unlimited, or null  The account can create unlimited subdomains.
This value defaults to unlimited.
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 packages Shell Access value.
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.
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.
This value defaults to the default hosting plan.
default
maxpark The accounts maximum number of parked domains (aliases).
  • A positive integer.
  • unlimited  The account can use unlimited parked domains.
This value defaults to the selected packages Maximum Parked Domains value.
unlimited
maxaddon The accounts maximum number of addon domains.
  • A positive integer.
  • 0 or unlimited  The account can use unlimited addon domains.
This value defaults to the selected packages Maximum Addon Domains value.
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.
  • y  Use the domains nameservers.
  • n  Use the servers nameservers.
This value defaults to 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.
This value defaults to the selected packages Locale value.
EN
spamassassin Whether Apache SpamAssassin is enabled on the account.
  • y  Enable SpamAssassin.
  • n  Disable SpamAssassin.
This value defaults to y.
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.
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 packages 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.
unlimited
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The servers_queue Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The auto-adjust-mysql-limits Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The autossl_check Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup_restore_manager Script

Valid for versions 82 through the latest version Last modified: July 28, 2022...