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

Get 24/7 expert server management

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

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend