Client Templates: client_template Utility

The client_template utility enables the administrator to manage client templates through CLI. By using this utility, you can perform the following tasks:

Syntax

client_template <command> <template name> [

<option_1> [<param>]

[<option_2> [<param>]]

…[<option_N> [<param>]]

Example

For the client template named ClientTemplate, the following command line sets the disk space limit for a client account to 20 GB, sets the account's validity period up until December 31, 2007, sets the Maximum number of subdomains limit to 20 subdomains, and enables the client to manage log rotation and mailing lists.

# ./client_template --update ClientTemplate -disk_space 20GB -max-subdom 20 -expiration 2007-12-31 -manage-log true -manage-mailllists true

Commands

Command

Parameter

Description

Example

--create or -c

<client template name>

Creates a new client template.

To create a client template named ClientTemplate:

# ./client_template --create ClientTemplate

or

# ./client_template -c ClientTemplate

--update or -u

<client template name>

Updates an existing client template.

To update a client template named ClientTemplate:

# ./client_template --update ClientTemplate

or

# ./client_template -u ClientTemplate

--remove or -r

<client template name>

Deletes a client template.

To remove a client template ClientTemplate:

# ./client_template --remove ClientTemplate

or

# ./client_template -r ClientTemplate

--xml-info or -i

<client template name>

Displays information about a client template in the XML format.

To display information about client template ClientTemplate:

# ./client_template --xml-info ClientTemplate

or

# ./client_template -x ClientTemplate

--help or -h

 

Displays help on the use of the utility.

To view help on the use of the utility:

# ./client_template --help

or

# ./client_template -h

Options

Option

Parameter

Description

Example

-new-name

<string>

Sets a new name for an existing client template.

To change the name of client template ClientTemplate to NewClientTemplate:

# ./client_template -u ClientTemplate -new-name NewClientTemplate

-cp-access

true|false

Enables or disables client's access to control panel (the Access to control panel parameter).

To disable control panel access in client template ClientTemplate:

# ./client_template -u ClientTemplate -cp-access false

-create-domains

true|false

Enables or disables creation of domains by a client (the Domain creation parameter).

To enable creation of domains by a client in client template ClientTemplate:

# ./client_template -u ClientTemplate -create-domains true

-manage-phosting

true|false

Enables or disables physical hosting management by a client (the Physical hosting management parameter).

To enable physical hosting management in client template ClientTemplate to:

# ./client_template -u ClientTemplate -manage-phosting true

-manage_php_safe_mode

true|false

Allows/Prohibits a client to turn PHP safe mode off and on. (The PHP safe mode management parameter.)

Default value is false.

Available since Plesk 8.1.1.

To allow he client with login name clientlogin to manage PHP safe mode:

# ./client_pref -u clientlogin -manage_php_safe_mode_true

-manage-quota

true|false

Enables or disables the hard disk quota management by a client (the Hard disk quota assignment parameter).

To enable the hard disk quota management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-quota true

-change-limits

true|false

Enables or disables changing domain limits by the client (the Domain limits adjustment parameter).

To enable changing domain limits in client template ClientTemplate:

# ./client_template -u ClientTemplate -change-limits true

-manage-dns

true|false

Enables or disables DNS zone management by a client (the DNS zone management parameter).

To enable DNS zone management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-dns true

-manage-log

true|false

Enables or disables log rotation management by a client (the Log rotation management parameter).

To enable log rotation management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-log true

-manage-crontab

true|false

Enables or disables crontab management (task scheduler) by a client (the Crontab management parameter).

To enable crontab management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-crontab true

-manage-anonftp

true|false

Enables or disables the anonymous FTP management by a client (the Anonymous FTP management parameter).

To enable the anonymous FTP management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-anonftp true

-manage-webapps

true|false

Enables or disables Java applications management by a client (the Java applications management parameter).

To enable Java applications management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-webapps true

-manage-maillists

true|false

Enables or disables mailing lists management by a client (the Mailing lists management parameter).

To enable mailing lists management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-maillists true

-manage-sh-access

true|false

Enables or disables management of server shell access of any type by a client (the Management of shell access to server parameter, the Client cannot allow or disallow shell access and Client can allow access to any type of shell options).

To enable server shell access management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-sh-access true

-manage-not-chroot-shell

true|false

Enables or disables management of server shell access to the chrooted environment by a client (the Management of shell access to server parameter, the Client can allow access only to a chrooted environment options).

To enable management of shell access only to the chrooted environment in a client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-not-chroot-shell false

 

-manage-subdomains

true|false

Enables or disables management of subdomains by a client (the Subdomains management parameter).

To enable management of subdomains in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-subdomains true

-allow-local-backups

true|false

Enables or disables backing up data and restoring data from backups using the the control panel repository by a client (the Allow backing up and restoring data and use / control panel's repository parameter).

To enable data backup and restore using the control panel's repository in client template ClientTemplate:

# ./client_template -u ClientTemplate -allow

-local-backups true

-allow-ftp-backups

true|false

Enables or disables backing up data and restoring data from backups using the the FTP repository by a client (the Allow backing up and restoring data and use / FTP repository repository parameter).

To enable data backup and restore using the FTP repository in client template ClientTemplate:

# ./client_template -u ClientTemplate -allow-ftp-backups true

-manage-drweb

true|false

Enables or disables Dr.Web antivirus application management by a client (the Dr.Web antivirus management parameter).

Deprecated since Plesk 8.1.1. Use the manage_virusfilter option instead.

To enable management of the Dr.Web antivirus application in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-drweb true

-manage_virusfilter

true|false

Allows/Prohibits a client changing settings of the antivirus tool used on his/her domains.

To enable management of the antivirus tool by the client with login name clientlogin:

# ./client_pref -u clientlogin -manage_virusfilter true

-remote-access-interface

true|false

Enables or disables the use of the remote XML interface by a client (the Ability to use remote XML interface parameter).

To allow the use the remote XML access interface in client template ClientTemplate:

# ./client_template -u ClientTemplate -remote-access-interface true

-manage-domain-aliases

true|false

Enables or disables management of domain aliases by a client (the Domain aliases management parameter).

To enable management of domain aliases in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-domain-aliases true

-manage-dashboard

true|false

Enables or disables desktop (dashboard) management by a client (the Desktop management parameter).

Can be set to true only if the -dashboard option is set to true.

To enable desktop (dashboard) management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-dashboard true

-dashboard

true|false

Enables or disables the use of the Desktop interface by a client. Sets the User interface parameter (the Desktop and standard interface are allowed and Only Desktop interface is allowed options only).

Can be set to false only if the -stdgui option is set to true.

  • To allow the use of Desktop interface in client template ClientTemplate:

    # ./client_template -u ClientTemplate -dashboard true

  • To allow the use of standard interface in client template ClientTemplate:

    # ./client_template -u ClientTemplate -stdgui true

  • To set the Desktop and standard interface are allowed option for the User interface parameter:

    # ./client_template -u ClientTemplate -dashboard true -stdgui true

  • To set the Only standard interface is allowed option for the User interface parameter:

    # ./client_template -u ClientTemplate -dashboard false -stdgui true

  • To set the Only Desktop interface is allowed option for the User interface parameter:

    # ./client_template -u ClientTemplate -dashboard true -stdgui false

-stdgui

true|false

Enables or disables the use of the standard interface by a client. Sets the User interface parameter (the Desktop and standard interface are allowed and Only standard interface is allowed options only).

Can be set to false only if the -dashboard option is set to true.

-manage-spamfilter

true|false

Enables or disables spam filter management by a client (the Spam filter management parameter).

To enable spam filter management in client template ClientTemplate:

# ./client_template -u ClientTemplate -manage-spamfilter true

-max-dom

<number>

Sets the Maximum number of domains limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of domains limit in client template ClientTemplate to 10:

# ./client_template -u ClientTemplate -max-dom 10

-max-dom-aliases

<number>

Sets the Maximum number of domain aliases limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of domain aliases limit in client template ClientTemplate to 10:

# ./client_template -u -max-dom-aliases 10

-disk-space

<number>[K|M|G]

Sets the Disk space limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Disk space limit in client template ClientTemplate to 100 MB:

# ./client_template -u ClientTemplate -disk-space 100M

-max-traffic

<number>[K|M|G]

Sets the Maximum amount of traffic limit (per month) for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum amount of traffic limit in client template ClientTemplate to 10 GB/month:

# ./client_template -u ClientTemplate -max-traffic 10G

-max-box

<number>

Sets the Maximum number of mailboxes limit (per month) for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mailboxes limit in client template ClientTemplate to 10:

# ./client_template -u ClientTemplate -max-box 10

-mbox-quota

<number>[K|M|G]

Sets the Set the mailbox quota limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Set the mailbox quota limit in client template ClientTemplate to 10 MB:

# ./client_template -u ClientTemplate -mbox-quota 10M

-max-redir

<number>

Sets the Maximum number of mail redirects limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail redirects limit in client template ClientTemplate to 10:

# ./client_template -u ClientTemplate -max-redir 10

-max-mg

<number>

Sets the Maximum number of mail groups limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail groups limit in client template ClientTemplate to 5:

# ./client_template -u ClientTemplate -max-mg 5

-max-resp

<number>

Sets the Maximum number of mail autoresponders limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mail autoresponders limit in client template ClientTemplate to 5:

# ./client_template -u ClientTemplate -max-resp 5

-max-wu

<number>

Sets the Maximum number of web users limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of web users limit in client template ClientTemplate to 50:

# ./client_template -u ClientTemplate -max-wu 50

-max-maillists

<number>

Sets the Maximum number of mailing lists limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of mailing lists limit in client template ClientTemplate to 30:

# ./client_template -u ClientTemplate -max-maillists 30

-max-db

<number>

Sets the Maximum number of databases limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of databases limit in client template ClientTemplate to 20:

# ./client_template -u ClientTemplate -max-db 2

-max-webapps

<number>

Sets the Maximum number of Java applications limit for a client.

Type "-1" to set the parameter to Unlimited.

 

To set the Maximum number of Java applications limit in client template ClientTemplate to 50:

# ./client_template -u ClientTemplate -max-webapps 50

-max-subdom

 

<number>

Sets the Maximum number of subdomains limit for a client.

Type "-1" to set the parameter to Unlimited.

To set the Maximum number of subdomains limit t in client template ClientTemplate to Unlimited:

# ./client_template -u ClientTemplate -max-subdom -1

-expiration

<YYYY-MM-DD>

Sets Validity period for for a client account.

Type "-1" to set the parameter to Unlimited.

To set the validity period in client template ClientTemplate to February 28, 2007:

# ./client_template -u ClientTemplate -expiration 2007-2-28

-ip-pool

add|del:<ip1>, <ip2>,..,<ipN>

Adds shared IP addresses to or deletes shared IP addresses from from a client's IP address pool (the Select shared IP addresses parameter).

To add shared IP addresses 192.168.67.78 and 192.168.78.89 to the IP address pool in client template ClientTemplate:

# ./client_template -u ClientTemplate -ip-pool add:192.168.67.78,192.168.78.89

-excl-ip-num

<number>

Sets the maximum number of exclusive IP addresses that can be assigned to a client (the Allocate exclusive IP addresses to the client / up to / IP addresses parameter).

To set the maximum number of exclusive IP addresses that can be assigned to a client in client template ClientTemplate to 5:

# ./client_template -u ClientTemplate -excl-ip-num 5