GNU/Linux >> Linux の 問題 >  >> Panels >> cPanel

Linux ターミナルを使用して cPanel アカウントを削除/終了する方法

この投稿では、Linux ターミナル / CLI (コマンド ライン インターフェース) を使用して cPanel アカウントを削除または終了する方法について説明します。

コマンド ラインから cPanel アカウントを削除/終了する

古いバージョンの cPanel ソフトウェアでは、cPanel アカウントを終了するには、次のスクリプトを実行する必要がありました:

/scripts/killacct

または

/usr/local/cpanel/scripts/killacct

古い cPanel バージョンで cpanel アカウントを削除する正しい構文は次のとおりです:

/scripts/killacct username

ただし、更新された cPanel リリースでは機能しません。

最新の cPanel バージョンで cPanel アカウントを終了する方法

最新の cPanel バージョンでは、古いスクリプトは機能しなくなりました。新しい「removeacct」スクリプトを使用する必要があります:

/scripts/removeacct

または

/usr/local/cpanel/scripts/removeacct

コマンド ラインを使用して cpanel アカウントを削除する正しい構文は次のとおりです。

/scripts/removeacct username

出力例:

[[email protected]:~] /scripts/removeacct cptips --force
Running pre removal script (/usr/local/cpanel/scripts/prekillacct)......Done
Collecting Domain Name and IP......Done
Locking account and setting shell to nologin......Done
Removing Sessions.........Done
Killing all processes owned by user......Done
Removing Suspended Info.........Done
Removing Web Logs......Done
Removing Bandwidth Files......Done
Removing any unneeded pending interface locks......Done
Removing Email Sending Limits Cache......Done
Removing DKIM keys......Done
Removing Crontab......Done
Removing IPv6......Done
Removing external authentication links …......Done
Running AutoSSL account deletion logic …......Done
Removing domain TLS resources …......Done
Removing HTTP Virtual Hosts......Done
Removing ftp Virtual Hosts......Done
Removing user's web content directory symlinks......Done
Removing MySQL databases and users......Done
Revoking MySQL Privs.......Done
Removing PostgreSQL databases and users......Done
Removing Two-Factor Authentication entries..........Done
Removing User & Group..........Done
Removing DNS Entries......Done
Removing Email Setup......Done
Removing mailman lists......Done
Updating Databases......Done
Removing bandwidth limits......Done
Removing Counter Data......Done
Adding IP back to the IP address pool......Done
Removing user's cPanel Databases & Updating......Done
Reloading Services......Done
Removing mail and service configs......Done
Sending Contacts......Done
Updating internal databases......Done
Running post removal scripts (/usr/local/cpanel/scripts/legacypostkillacct, /usr/local/cpanel/scripts/postkillacct)......Done
Account Removal Complete!!!......Done
User: cptips
Domain: nixcp.com
Removed the following non-SSL virtual hosts: nixcp.com
Removed the following SSL virtual hosts:

Listing MySQL dbs for removal.
Fetching MySQL DB Owner information.

Successnixcp.com => deleted from server.
Removing /etc/valiases/nixcp.com
System has 23 free ips.

cptips account removed
[[email protected]:~]

これで、Linux ターミナル/コマンド ラインから 1 つのコマンドで cpanel アカウントを終了する方法がわかりました。プロセスの実行中に確認 (yes または no) を回避するために –force を渡したことに注意してください。

コマンド ラインから複数の cPanel アカウントを終了するにはどうすればよいですか?

たとえば、for ループを使用できます。

for cpuser in user1 user2 user3; do /scripts/removeacct $cpuser --force; done

コマンド ラインからすべての cpanel アカウントを終了するにはどうすればよいですか?

/var/cpanel/users ディレクトリに対して for ループを実行することにより、サーバーからすべての cpanel アカウントを削除/終了できます。例:

cd /var/cpanel/users
for cpuser in *; do /scripts/removeacct $cpuser --force; done
Linux ターミナルを使用して cPanel アカウントを削除/終了する方法が最後に変更されました:2017 年 2 月 7 日、Esteban Borges によって
cPanel
  1. cPanelを使用してPHPバージョンをデフォルトバージョンにリセットする方法は?

  2. DNSゾーンエディターを使用してcPanelでMXレコードを編集または削除するにはどうすればよいですか?

  3. DNSゾーンエディタを使用してcPanelのCNAMEレコードを編集または削除するにはどうすればよいですか?

  1. DNSゾーンエディターを使用してcPanelのレコードを編集または削除するにはどうすればよいですか?

  2. WHM を使用して cPanel アカウントをアップグレード/ダウングレードする方法

  3. cPanel アカウントへのシェル アクセスを許可 (または削除) する方法

  1. リセラー WHM で cPanel を削除する方法

  2. cPanel キャッシュ マネージャーを削除する方法

  3. cPanel Zone Editor を使用して MX レコードを設定する方法