Admin-Ahead Community

Linux => Control Panels => cPanel => Topic started by: aneeshs on July 29, 2017, 10:50:21 pm

Title: Bulk cPanel Password Reset Script
Post by: aneeshs 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 :)