How to change cPanel theme for multiple accounts?
The cPanel theme for an account is specified in the /var/cpanel/users/username file in the format
RS=value
For example:
BWLIMIT=unlimited
DEMO=0
DNS=domainname.com
FEATURELIST=default
HASCGI=1
IP=IPHERE
LANG=english
LOCALE=en
MAXADDON=0
MAXFTP=0
MAXLST=0
MAXPARK=0
MAXPOP=5
MAXSQL=0
MAXSUB=0
MTIME=1271068514
OWNER=root
PLAN=default
STARTDATE=1228721668
USER=username
RS=x3
where, x3 is the theme. WHM only provides the option to change the cPanel theme for an account one at a time. In order to change the theme for all the accounts at once, execute the following script:
for i in `ls -la /var/cpanel/users/ | awk ‘{print $9}’ | sed ‘1,3 d’`
do
sed -i “/RS/d” $i;
echo “RS=x3″ >> $i;
done;
here, it will change the cPanel theme of all the accounts on the server to ‘x3′ theme. Since all the files are updated manually, you need to execute the following script to rebuild the cache
/scripts/updateuserdomains
Note: The single OR double quotes in the script may change to dot (.) on copy/pasting the command in the shell, so make sure you correct those before executing the command.
Tags: change cPanel theme for multiple accounts, change cpanel theme from whm, change cpanel x3 theme, how to change Change cPanel theme?, rebuild the cache in cpanel, updateuserdomains in cpanel

December 3rd, 2009 at 2:15 pm
[...] from: LinuxHostingSupport.net » Blog Archive » Howto: Change cPanel … By admin | category: linux hosting | tags: account-one, away-grows, cpanel, cpmod, info, [...]