November 26

Script to update a passwords for the all cPanel users:

#! /bin/bash
ls -1 /var/cpanel/users | while read user; do
pass=`strings /dev/urandom | tr -dc .~?_A-Z-a-z-0-9 | head -c16 | xargs`
echo “$user $pass” >> new-pass.txt
/scripts/realchpass $user $pass
/scripts/ftpupdate
done


Copyright 2021. All rights reserved.

Posted 26 November 2018 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.