cPanel® Blog

Skipping the WHM Getting Started Wizard

In this article we detail the steps required to remove the Getting Started Wizard.  Someone may want to do this for the purpose of delivering servers in a “Configured” state.

Recently, I was asked “How do I skip the WHM Getting Started Wizard?”  This is normally done so that server resellers can deliver servers in a “configured state.”  Automating steps within the first time wizard is a very easy task.  This consists of three stages:

  1. Touching a file
  2. Writing /etc/wwwacct.conf
  3. Starting services and configuring quotas

The Touch File
WHM uses a touch file (/etc/.whostmgrft) to determine whether the Getting Started Wizard should run. You can skip the WHM first time wizard by running the following command:
touch /etc/.whostmgrft

Writing /etc/wwwacct.conf
/etc/wwwacct.conf is the file that contains most of the basic setup instructions for cPanel/WHM.  This information includes the hostname, nameservers and other important information for the operation of cPanel servers.  Below is an example of what an /etc/wwwacct.conf file should look like:
ADDR 255.255.255.255
CONTACTEMAIL notmattdees@cpanel.net
CONTACTPAGER
DEFMOD x3
ETHDEV eth0
HOMEDIR /home
HOMEMATCH home
HOST example.cpanel.net
LOGSTYLE combined
MINUID
NS ns1.cpanel.net
NS2 ns2.cpanel.net
NS3
NS4
NSTTL 86400
SCRIPTALIAS y
TTL 14400

It may not be obvious what each of these keys doe, the table below explains each key:

KeyValue
ADDRThe default IP of the server.
CONTACTEMAILThe system administrator’s email address. This address is used for sending notifications of account creation/termination, service status information, and numerous other events.
CONTACTPAGERThe SMS number used for notifications.
DEFMODThe default cpanel theme to use.
ETHDEVThe default ethernet device. This should normally be eth0 on linux servers (unless the server is running virtuozzo).
HOMEDIRThe location of the default home directory.
HOMEMATCHA string that can be used to determine whether a partition should be used as a home directory for new accounts. (e.g. a value of ‘users’ would match system mounts of: ‘users’ ‘lusers’ ‘users2’.)
LOGSTYLEThe Apache log format to use. This should always be combined.
MINUIDThe minimum UID of cPanel created accounts. This defaults to 500 if this setting is not set.
NS or NS(2-4)Nameservers to add to DNS zones by default. Without this setting at least the NS and NS2 values, account creation will fail.
NSTTLThe default TTL for use for DNS zones on your server.
SCRIPTALIASDefines whether a /cgi-bin/ directory should be aliased on account creation.

You can copy or generate this configuration.  One way or the other, it needs to exist.  If you need help creating this configuration file, please post in the Developer’s Discussions forum and we will see what we can do about helping you out.

Configuring Services
One of the primary functions of the Getting Started Wizards is to allow users to select what DNS, FTP, and IMAP services they wish to use on a server.  These selections are handled by a few scripts.  These scripts do not have to run, but should be run if you wish to change the service from the default daemon.   Default (recommended) values are italicized below:

  • IMAP – /scripts/setupmailserver (courier OR dovecot OR disabled)
  • DNS – /scripts/setupnameserver (bind OR nsd OR disabled)
  • FTP – /scripts/setupftpserver (pure-ftpd OR proftpd OR disabled)

Initializing Quotas
On a cPanel server, quotas need to be initialized, ensuring that the home directory is mounted with quotas enabled.  To perform this step, /scripts/initquotas needs to be ran.

/scripts/initquotas

One all of the steps have been performed, your “Getting Started Wizard” has been fully automated.

cPanel

The web hosting industry’s most reliable, intuitive control panel since 1997. With our first-class support and rich feature set, it’s easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.com.