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

The following command updates the client template Client Template as follows: the client is allowed to manage log rotation and mailing lists and to create up to 20 subdomains. The use of disk space allotted for the client is restricted to 20 GB, and the expiration date of the client account is set to 2008-12-31.

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

Commands

Command

Parameter

Description

Example

--create or -c

<client_template_name>

Creates a new client template.

To create the template named Client Template:

# ./client_template --create "Client Template"

or

# ./client_template -c "Client Template"

--update or -u

<client_template_name>

Updates an existing client template.

To allow clients created with the template Client template to create domains:

# ./client_template --update "Client Template" -create-domains true

or

# ./client_template -u "Client Template" -create-domains true

--remove or -r

<client_template_name>

Deletes a client template.

To remove the template Client Template:

# ./client_template --remove "Client Template"

or

# ./client_template -r "Client Template"

--xml-info or -i

<client_template_name>

Displays information about a client template in the XML format.

To view information about the template Client Template in the XML format:

# ./client_template --xml-info "Client Template"

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 rename the template from Client Template 1 to Client Template 2:

# ./client_template -u "Client Template 1" -new-name "Client Template 2"

-cp-access

true|false

Allows/Prohibits accessing Plesk GUI (as opposite to using Plesk API).

Is true by default.

To prohibit the client created with the template Client Template from accessing Plesk GUI:

# ./client_template -u "Client Template" -cp-access false

-create-domains

true|false

Allows/Prohibits creating domains.

Is false by default.

To allow clients created with the template Client Template to create domains:

# ./client_template -u "Client Template" -create-domains true

-manage-phosting

true|false

Allows/Prohibits managing physical hosting.

Is false by default.

To allow clients created with the template Client Template to manage physical hosting:

# ./client_template -u "Client Template" -manage-phosting true

-manage_php_safe_mode

true|false

Allows/Prohibits managing PHP safe mode.

Is false by default.

Available since Plesk 8.1.1.

To allow clients created with the template Client Template to manage php safe mode:

# ./client_template -u "Client Template" -manage-php-safe-mode true

-manage-quota

true|false

Allows/Prohibits managing hard disk quota.

Is false by default.

To allow clients created with the template Client Template to manage hard disk quota:

# ./client_template -u "Client Template" -manage-quota true

-change-limits

true|false

Allows/Prohibits changing domain limits.

Is false by default.

To allow clients created with the template Client Template to change domain limits:

# ./client_template -u "Client Template" -change-limits true

-manage-dns

true|false

Allows/Prohibits managing DNS.

Is false by default.

To allow clients created with the template Client Template to manage DNS:

# ./client_template -u "Client Template" -manage-dns true

-manage-log

true|false

Allows/Prohibits managing log rotation.

Is false by default.

To allow clients created with the template Client Template to manage log rotation:

# ./client_template -u "Client Template" -manage-log true

-manage-crontab

true|false

Allows/Prohibits managing task scheduler.

Is false by default.

To allow clients created with the template Client Template to manage task scheduler:

# ./client_template -u "Client Template" -manage-crontab true

-manage-anonftp

true|false

Allows/Prohibits managing anonymous FTP.

Is false by default.

To allow clients created with the template Client Template to manage anonymous FTP:

# ./client_template -u "Client Template" -manage-anonftp true

-manage-webapps

true|false

Allows/Prohibits managing Java applications.

Is false by default.

To allow clients created with the template Client Template to manage Java applications:

# ./client_template -u "Client Template" -manage-webapps true

-manage-maillists

true|false

Allows/Prohibits managing mailing lists.

Is false by default.

To allow clients created with the template Client Template to manage mailing lists:

# ./client_template -u "Client Template" -manage-maillists true

-manage-sh-access

true|false

Allows/Prohibits managing system access.

Is false by default.

To allow clients created with the template Client Template to manage system access:

# ./client_template -u "Client Template" -manage-sh-access true

-manage-not-chroot-shell

true|false

Allows/Prohibits managing non-chrooted environment.

Is false by default.

To allow clients created with the template Client Template to manage non-chrooted environment:

# ./client_template -u "Client Template" -manage-not-chroot-shell true

-manage-subdomains

true|false

Allow/Prohibits managing subdomains.

Is false by default.

To allow clients created with the template Client Template to manage subdomains:

# ./client_template -u "Client Template" -manage-subdomains true

-allow-local-backups

true|false

Allows/Prohibits backing up and restoring data using the Plesk repository.

Is false by default.

To allow clients created with the template Client Template to back up and restoring data using the Plesk repository:

# ./client_template -u "Client Template" -allow-local-backups true

-allow-ftp-backups

true|false

Allows/Prohibits backing up and restoring data using the FTP repository.

Is false by default.

To allow clients created with the template Client Template to back up and restoring data using the FTP repository:

# ./client_template -u "Client Template" -allow-ftp-backups true

-manage-drweb

true|false

Allows/Prohibits managing Dr.Web antivirus application.

Is false by default.

Deprecated since Plesk 8.1.1. Use the -manage_virusfilter option instead.

To allow clients created with the template Client Template to manage the Dr.Web antivirus application:

# ./client_template -u "Client Template" -manage-drweb true

-manage-virusfilter

true|false

Allows/Prohibits managing antivirus tool.

Is false by default.

To allow clients created with the template Client Template to manage antivirus tool:

# ./client_template -u "Client Template" -manage-virusfilter true

-remote-access-interface

true|false

Allows/Prohibits using Plesk API.

Is false by default.

To allow clients created with the template Client Template to use Plesk API:

# ./client_template -u "Client Template" -remote-access-interface true

-manage-domain-aliases

true|false

Allows/Prohibits managing domain aliases.

Is false by default.

To allow clients created with the template Client Template to manage domain aliases:

# ./client_template -u "Client Template" -manage-domain-aliases true

-manage-dashboard

true|false

Allows/Prohibits managing desktop view.

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

Is true by default.

To prohibit clients created with the template Client Template from managing desktop view:

# ./client_template -u "Client Template" -manage-dashboard true

-dashboard

true|false

Allows/Prohibits using desktop view.

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

Is true by default.

To prohibit clients created with the template Client Template from using desktop view:

# ./client_template -u "Client Template" -dashboard false

-stdgui

true|false

Allows/Prohibits using standard view.

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

Is true by default.

To prohibit clients created with the template Client Template from using standard view:

# ./client_template -u "Client Template" -stdgui false

-manage-webstat

true|false

Allows/Prohibits managing web statistics.

Is false by default.

Available since Plesk 8.2.

To allow clients created with the template Client Template to manage web statistics:

# ./client_template -u "Client Template" -manage-webstat true

-manage-spamfilter

true|false

Allows/Prohibits managing spam filter.

Is false by default.

To allow clients created with the template Client Template to manage spam filter:

# ./client_template -u "Client Template" -manage-spamfilter true

-max-dom

<number>

Limits the number of available domains.

Unlimited if set to -1.

To restrict the maximum number of domains available to clients created with the template Client Template to 10:

# ./client_template -u "Client Template" -max-dom 10

-max-dom-aliases

<number>

Limits the number of availble domain aliases.

Unlimited if set to -1.

To restrict the maximum number of domain aliases available to clients created with the template Client Template to 5:

# ./client_template -u "Client Template" -max-dom-aliases 5

-disk-space

<number>[K|M|G]

Limits the amount of available disk space.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1.

To restrict the maximum amount of the disk space available to clients created with the template Client Template to 100 MB:

# ./client_template -u "Client Template" -disk-space 100M

-max-traffic

<number>[K|M|G]

Limits the monthly traffic usage.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1.

To restrict the maximum amount of traffic available to clients created with the template Client Template to 10 GB/month:

# ./client_template -u "Client Template" -max-traffic 10G

-max-box

<number>

Limits the number of available mailboxes.

Unlimited if set to -1.

To restrict the maximum number of mailboxes available to clients created with the template Client Template to 100:

# ./client_template -u "Client Template" -max-box 100

-mbox-quota

<number>[K|M|G]

Limits the amount of disk space that a single mailbox can occupy.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1

To set the mailbox quota available to clients created with the template Client Template to 10 MB:

# ./client_template -u "Client Template" -mbox-quota 10M

-max-redir

<number>

Limits the number of available mail redirects.

Unlimited if set to -1.

To restrict the maximum number of mail redirects available to clients created with the template Client Template to 10:

# ./client_template -u "Client Template" -max-redir 10

-max-mg

<number>

Limits the number of available mail groups.

Unlimited if set to -1.

To restrict the maximum number of mail groups available to clients created with the template Client Template to 5:

# ./client_template -u "Client Template" -max-mg 5

-max-resp

<number>

Limits the number of available mail autoresponders.

Unlimited if set to -1.

To restrict the maximum number of mail autoresponders available to clients created with the template Client Template to 15:

# ./client_template -u "Client Template" -max-resp 15

-max-wu

<number>

Limits the number of available mail users.

Unlimited if set to -1.

To restrict the maximum number of mail users available to clients created with the template Client Template to 50:

# ./client_template -u "Client Template" -max-wu 50

-max-maillists

<number>

Limits the number of available mailing lists.

Unlimited if set to -1.

To restrict the maximum number of mailing lists available to clients created with the template Client Template to 30:

# ./client_template -u "Client Template" -max-maillists 30

-max-db

<number>

Limits the number of available databases.

Unlimited if set to -1.

To restrict the maximum number of databases available to clients created with the template Client Template to 2:

# ./client_template -u "Client Template" -max-db 2

-max-webapps

<number>

Limits the number of available Java applications.

Unlimited if set to -1.

To restrict the maximum number of Java applications available to clients created with the template Client Template to 50:

# ./client_template -u "Client Template" -max-webapps 50

-max-subdom

<number>

Limits the number of available subdomains.

Unlimited if set to -1.

To set the number of subdomains available to clients created with the template Client Template to unlimited:

# ./client_template -u "Client Template" -max-subdom -1

-expiration

<YYYY-MM-DD>

Sets validity period for client accounts created with a template.

Unlimited if set to -1.

To restrict the validity period to clients created with the template Client Template to 20 days:

# ./client_template -u "Client Template" -expiration 20D

-ip-pool

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

Adds/Deletes shared IP addresses to/from IP address pool.

To add shared IP addresses 192.0.2.78 and 192.0.2.89 to the IP address pool for clients created with the template Client Template:

# ./client_template -u "Client Template" -ip-pool add:192.0.2.78,192.0.2.89

-excl-ip-num

<number>

Limits the number of available exclusive IP addresses that can be assigned to a client.

To restrict the maximum number of exclusive IP addresses available to clients created with the template Client Template to 4:

# ./client_template -u "Client Template" -excl-ip-num 4