Client Accounts: client Utility

The client utility is used to manage Plesk client accounts through CLI. By using this utility, you can perform the following tasks:

Syntax

client <command> <client login name> [

<option_1> [<param>]

[<option_2> [<param>]]

…[<option_N> [<param>]]

Example

The following command line creates client account with contact name Michael Smith, Plesk control panel login name clientlogin, and password clientpass, specifies the Unites States as the client's country, and prevents automatic sending of standard Plesk e-mail notifications (if they are enabled) about the account creation.

# ./client --create clientlogin -name "Michael Smith" -passwd clientpass -country US -notify false

Commands

Command

Parameter

Description

Example

--create or -c

<login name>

Creates a new client account. The argument of the command must begin with an alphabetic symbol.

To create a client account named Michael Smith with client login name clientlogin and password clientpass:

# ./client --create clientlogin -name "Michael Smith" -passwd clientpass

or

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass

--update or -u

<login name>

Updates settings of an existing client account.

To change client login name to newlogin and password to newpass for the client with current login name clientlogin:

# ./client --update clientlogin -login newlogin -passwd newpass

or

# ./client -u clientlogin -login newlogin -passwd newpass

--remove or -r

<login name>

Deletes a client account.

To remove the client account with login name clientlogin:

# ./client --remove clientlogin

or

# ./client -r clientlogin

--info or -i

<login name>

Displays information about client account settings.

Displays information about the client account with login name clientlogin:

# ./client --info clientlogin

or

# ./client -i clientlogin

--on

<login name>

Enables a client account.

To enable the client account with login name clientlogin:

# ./client --on clientlogin

--off

<login name>

Disables a client account.

To the client account with login name clientlogin:

# ./client --off clientlogin

--help or -h

 

 

Displays help on the use of the utility.

To display help on the client utility:

# ./client --help

or

# ./client -h

Options

Option

Parameter

Description

Example

-status

enabled|disabled|admin|expired

Enables or disables a client account (the enabled or disabled parameters, respectively). Disables a client account and sets the account status to Account is disabled by administrator (admin), Account is expired (expired).

To enable client account with client login name clientlogin:

# ./client -u clientlogin -status enabled

To disable client account with login name clientlogin and assign status Account is disabled by administrator to the account:

# ./client -u clientlogin -status admin

-company

<string>

Sets the client's Company name.

To set company name to New Company, Inc. for the client with login name clientlogin:

# ./client -u clientlogin -company "New Company, Inc."

-name

<string>

Sets the client's Contact name.

Required for the --create command.

To create a client account named Michael Smith (also the contact name for the client) with client login name clientlogin and password clientpass:

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass

-login

<client login name>

Changes the client's login name used to log in to Plesk control panel (the Login parameter).

Used only with the --update command.

To change client login name to newlogin for the client with current login name clientlogin:

# ./client -u clientlogin -login newlogin

-passwd

<password>

Sets the client's password for logging in to Plesk control panel (the Password parameter).

Required for the --create command.

For additional comments, see the Note below.

To create a client account named Michael Smith with client login name clientlogin and password clientpass:

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass

-passwd_type

plain| crypt

Specifies the type of client password - plain or cryptic.

Set to plain by default.

For additional comments, see the Note below.

To set the type of the client's password to cryptic for the client with login name clientlogin:

# ./client -u clientlogin -passwd_type crypt

-phone

<number>

Sets the client's phone number (the Phone parameter).

To set the phone number to 555-2345 for the client with login name clientlogin:

# ./client -u clientlogin -phone 555-2345

-fax

<number>

Sets the client's fax number (the Fax parameter).

To set the fax number to 555-2345 for the client with login name clientlogin:

# ./client -u clientlogin -fax 555-2345

-email

<string>

Sets the client's e-mail address (the E-mail parameter).

To set the e-mail address to client@example.com for the client with login name clientlogin:

# ./client -u clientlogin -fax client@example.com

-address

<string>

Sets the client's street address (the Address parameter).

To set the street address to 8 Main street for the client with login name clientlogin:

# ./client -u clientlogin -address "8 Main street".

-city

<string>

Sets the client's city address (the City parameter).

To set the city address to New York for the client with login name clientlogin:

# ./client -u clientlogin -city "New York"

-state

<string>

Sets the client's state or province (the State/Province parameter).

To set the province to British Columbia for the client with login name clientlogin:

# ./client -u clientlogin -state "British Columbia"

-zip

<string>

Sets the client's postal code (the Postal/ZIP code parameter).

To set the postal code to 52345 for the client with login name clientlogin:

# ./client -u clientlogin -zip 52345

-country

<country code>

Sets the client's country address (the Country parameter).

The option's argument must be a valid two-letter code as described in ISO-3166).

 

To set the country to United States for the client with login name clientlogin:

# ./client -u clientlogin -country US

-notify

true|false

Allows or prevents standard e-mail notifications about client account creation (Plesk domain administrators and clients).

Used only with the --create command.

To prevent sending standard e-mail notifications about creation of client account Michael Smith with client login name clientlogin and password clientpass::

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -notify false

-template

<template name>

Specifies client template to be used for client creation.

Used only with the --create command.

To specify client template ClientTemplate to create client account Michael Smith with client login name clientlogin and password clientpass:

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -template ClientTemplate

-force

 

Forces the use of a client template to create a client account even if some of the template options cannot be implemented (the "use anyway" situation).

Used only with the --create command.

To force the use of client template ClientTemplate to create client account Michael Smith with client login name clientlogin and password clientpass:

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -template ClientTemplate -force

-creation-date

<YYYY-MM-DD>

Sets the client account creation date (can be arbitrary).

Used only with the --create command.

To set the creation date to 2006-12-30 for new client account Michael Smith with client login name clientlogin and password clientpass :

# ./client -c clientlogin -name "Michael Smith" -passwd clientpass -creation-date 2006-12-30

Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.
Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.