• cPanel Mass Password Changer

This bash/gawk script takes a CSV file with a list of domain, username, password & uses the cPanel WHMAPI system to update the password of each user account that is provided with a password within the CSV file.

Features:

  • Progress is reported in output.
  • Passwords are not reported in output.
  • Uses cPanel whmapi1 command line tool to perform the change so system, mysql, ftp and mail passwords are updated as well.

Limitations:

  • cPanel account username must be column 2
  • Passwords must be column 3
  • The first (header) line of the CSV file is skipped completely

Download:

Sample Output:

Processing CSV file (each dot represents 100 accounts).
Progress............d.....done.
Processing entries in order received.
Found 1784 entries. Processing:
[1/1784] (xxxxxxx)
        ---
        data:
          app:
            - system
            - ftp
            - mail
            - MySQL
        metadata:
          command: passwd
          output:
            raw: "Password for “xxxxxxxx” has been changed.FTP (File Transfer Protocol) password change has been queued.\n"
          reason: Password changed for user “xxxxxxx”.
          result: 1
          version: 1