web analytics

Blog

Change all user account passwords in a cPanel server

Tags: cPanelLinuxpassword changesscripting

Published on: July 14, 2015 by Arnold Pablo

Change all user account passwords in a cPanel server

Scenario:

There may be a requirement where you would need to change multiple account passwords in a cPanel server. This script would be of help in changing the passwords of entire accounts in cPanel.


#!/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

Category : cPanel, Linux, Snippets

Arnold Pablo

Arnold Pablo

Technology always fascinated me and continues to do so. I started my career back in 2004 as a Junior System Admin and worked in various capacities both in technical and managerial roles. I love to experiment and try out new OSS projects and in free time, go for cycling to the interiors of God's own country, Kerala!

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items