cPanel主機管理 – 使用命令列建立、暫停與刪除使用者帳號
建立/Create
/scripts/wwwacct
語法:
wwwacct <domain> <user> <pass> <quota> <cpmod[advanced/?]> <ip[y/n]> <cgi[y/n]> <frontpage[always n]> <maxftp> <maxsql> <maxpop> <maxlst> <maxsub> <bwlimit> <hasshell[y]/[n]> <owner> <plan> <maxpark> <maxaddon> <featurelist> <contactemail> <use_registered_nameservers> <language> <spamassassin[Y/n]> <max_emailacct_quota> <spambox[Y/n]>Example: (我親測成功的例,以下的參數請對照上面的語法理解。)
echo y | /scripts/wwwacct test.stu.fgchen.com stu123 Fgchen5424 2048 paper_lantern n n n 0 0 0 0 0 0 n root stu2GB 0 0 '' fgchen@gmail.com '' en y 1024 y
上面實例輸出:
+===================================+
| New Account Info |
+===================================+
| Domain: test.stu.fgchen.com
| UserName: stu123
| PassWord: Fgchen5424
+===================================+
Checking input data...Validating Username......Done
Validating IP......Done
Validating Contact Email......Done
...Done
Validating system setup......Done
Checking for database conflicts......Done
WWWAcct 12.6.0 (c) 2021 cPanel, L.L.C.......Done
Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done
Adding User......Done
Adding Entries to userdata......Done
Copying skel files from /root/cpanel3-skel/ to /home/stu123/......Done
Setting up Mail & Local Domains......Done
Configuring DNS......Done
Verifying MX Records and Setting up Databases......Done
Setting up Service Subdomains......Done
Updating Authentication Databases......Done
Setting passwords......Done
Updating the userdata cache......Done
Setting up Horde database in the background.......Done
Creating bandwidth datastore......Done
Updating the dedicated IP address usage cache......Done
Generating and installing DKIM keys......Done
Enabling Apache SpamAssassin™......Done
Enabling Apache SpamAssassin™ Spam Box......Done
Sending Account Information......Done
Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done
Account Creation Complete!!!......Done
Account Creation Ok
Dns Zone check is enabled.
+===================================+
| New Account Info |
+===================================+
| Domain: test.stu.fgchen.com
| Ip: 192.192.246.126 (n)
| HasCgi: n
| UserName: stu123
| PassWord: Fgchen5424
| CpanelMod: paper_lantern
| HomeRoot: /home
| Quota: 2 GB
| NameServer1: 8.8.8.8
| NameServer2: ns2.cprapid.com
| NameServer3:
| NameServer4:
| Contact Email: fgchen@gmail.com
| Package: stu2GB
| Feature List: default
| Language: en
+===================================+
Custom Account Data Provided: no
Removing Shell Access (n)
Successlocaldomains...valiases ...vdomainaliases ...vfilters ...Zone test.stu.fgchen.com has been successfully added
Reconfiguring Mail Routing:
LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for test.stu.fgchen.com's mail.:
This configuration has been manually selected.
wwwacct creation finished
Account Creation Ok
參考資料:
暫停/Suspend
/usr/local/cpanel/scripts/suspendacct [account] [options]