Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Bulk cPanel Password Reset Script  (Read 1994 times)

0 Members and 1 Guest are viewing this topic.

aneeshs

  • Guest
Bulk cPanel Password Reset Script
« on: July 29, 2017, 10:50:21 pm »
During the times when you need to change multiple account passwords on a cPanel server, the script below helps to change passwords of all the accounts in cPanel:

Code: [Select]

#!/bin/bash
export ALLOW_PASSWORD_CHANGE=1
for i in `cat /etc/trueuserdomains | cut -d " " -f 2`;
 do
   pass=`openssl rand -base64 128 | head -c16 | xargs`
   echo $i:$pass >> pass.txt
   /scripts/realchpass $i $pass;
 done;
/scripts/ftpupdate

Cheers :)