• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Creating Customer Accounts From the CLI

Eric Pretorious

Regular Pleskian
Can one of the 128 CLI tools available for managing Plesk...
Code:
[root@www psa]# find bin/ admin/bin/ admin/sbin -type f | wc -l
128
...be used to create Customer Accounts? e.g., The admin/sbin/deployer tool seems promising:

Code:
[root@www psa]# admin/sbin/deployer --help
deployer. Plesk Migration Manager.
(c) Parallels

 Usage:

    deployer --deploy-dump --session-path <dir>
        [--domain-template <template>] [--notify] [--backup-user <login>]
        [--backup-user-type=<admin|client|domain-admin>]
        [--verbose]

    deployer --get-agents-list [--verbose]

    deployer --delete-session --session-path <dir> [--verbose]


 Available commands:

    --deploy-dump       Deploy Plesk XML dump
    --delete-session    Deletes session from the local host
    --get-agents-list   Returns XML description of available migration agents
    --help              This help page


 Available options:

    --session-path    <directory>  Specifies path to working session
                                   on the localhost
    --repository-url  <directory>  Specifies path to dump directory (local path or url)
    --repository-login <login>     Specifies login to access to repository
    --repository-pwd   <password>  Specifies login's password to access to repository					
    --agent-name      <agent>      The name of migration agent
    --domain-template <template>   Plesk domain template to use upon domains
                                   deployment
    --notify                       Send email notification to accounts created
                                   upon deployment
    --backup-user     <login>      Login of Plesk user, whose privileges
                                   should be used upon deployment
    --backup-user-type <admin|client|domain-admin>
                                   Level of deployment: deployment on the
                                   server level, on the client or domain-level
                                   user
    --suspend                      Suspend domains during restore			
    --verbose                      Output additional debug information
    --debug                        Output all debug information
Is there documentation available for these commands?
 
Last edited:
The usermng tool seems related but, AFAICT, manages system [user] accounts and not client information:
Code:
[root@www psa]# admin/sbin/usermng --help
Usage: usermng [OPTIONS]...

  --add-user --user=<username> --homedir=<homedir> [--shell=<shell>] [--quota=<quota>] [--mapped-to=<username>]
        (!!! Warning:  Plain-text Passwd set in system enviroment PSA_PASSWD or Encrypted Password - in system enviroment PSA_CRYPTED_PASSWD)
  --mod-user --old-user=<username> --new-user=<username> [--homedir=<homedir>] [--shell=<shell>] [--quota=<quota>] [--mapped-to=<username>]
        (!!! Warning:  Homedir is not modifying inside)
  --del-user --user=<username> [--homedir=<homedir>] [--mapped-to=<username>]
        (!!! Warning:  Homedir MUST be in HTTPD_VHOST_D; Homedir isn't delete if not given)
  (--user-access-on | --user-access-off) < Users from stdin (delimiter - \n)
  --user-exist --user=<username>
  --set-user-quota --user=<username> --quota=<quota>
        (!!! Warning:  Quota set in Bytes)
        (!!! Warning:  Quota returned in Bytes)
  --isquotable [--path=<path>]
  --isquotable-quiet [--path=<path>] (don't print error messages when quota isn't supported)
  --map-user --user=<username> --mapped-to=<username>
        (!!! Warning: file in homedir may change owner to new user)
  -h, --help
        display this help and exit

And the chrootmng tool seems like it'd be helpful too:
Code:
[root@www psa]# admin/sbin/chrootmng --help
Usage:

 --create --source=<source> --target=<target> [--safe] [--setup-user=<username>]
 --remove --source=<source> --target=<target>

  --create                        create chrooted environment
  --remove                        remove chrooted environment
  --target=VAL                    the  virtual host directory
  --source=VAL                    directory ot progs&libs patterns
  --setup-user=VAL                setup system accounts for this user
  --safe                          allow linking suid&sgid files
But neither seems like it's the whole solution.
 
Last edited:
Back
Top