How to fix mail routing by rebuilding /etc/localdomains and /etc/remotedomains
cPanel provides script to do this over command line
/scripts/checkalldomainsmxs
Enjoy!
Notes
cPanel provides script to do this over command line
/scripts/checkalldomainsmxs
Enjoy!
Please see example below:
df -h |sed -E 's/[[:space:]]+/,/g' > testfile.xls
You now can open testfile.xls file using Excel or analog to see your table
You may generate any table comma separated to get excel table… Read the rest
Run for a second:
yes "some text" > testfile.txt
Reduce size:
truncate -s 50M testfile.txt
Create 50M file using fallocate command
fallocate -l 52428800 testfile.txt
To be more exact using inline arithmetic:
fallocate -l $((50*1024*1024)) > testfile.txt
Using head command
head -c 50MB /dev/urandom > testfile.txt… Read the rest
To see user’s bandwidth for certatin period run next:
whmapi1 showbw searchtype=user search=Username year 2022 month 2
Enjoy!… Read the rest
Run the following to change your master domain:
whmapi1 modifyacct user=USERNAME domain=NEWDOMAIN.COM
Enjoy!… Read the rest
Run and put your domain:
read -p "Domain: " domain; username=`/scripts/whoowns $domain`; email=`grep @ /var/cpanel/users/$username |tail -n1 |cut -d '=' -f2|sed -e 's/@/\%40/'`; whmapi1 generatessl domains=$domain countryName=US stateOrProvinceName=Texas localityName=Houston organizationName="The Justice League of GG" emailAddress=$email pass=`openssl rand -base64 15` keysize=2048 skip_certificate=0
Now use WHM to install it
Enjoy!… Read the rest
Useful when you try to send a request from cPanel shell from your Dedicated IP address
For curl you need to use –interface to specify IP address
Example:
curl --interface 11.22.33.44 http://alltime.pp.ua/
For wget you need to use –bind-address to set IP from which you need to send a request
wget --bind-address=192.0.2.116 http://alltime.pp.ua/… Read the rest
BusyBox combines tiny versions of many common UNIX utilities into a single small executable.
This may help you when you got your shell broken since busybox in independent binary which includes a lot of commands inside.
In simple words this tool can save your life ๐
Find the latest version of busybox at https://busybox.net/downloads/binaries… Read the rest
The slave installation will lose users
wp user list
+—-+————+————–+————+—————–+——-+
| ID | user_login | display_name | user_email | user_registered | roles |
+—-+————+————–+————+—————–+——-+
+—-+————+————–+————+—————–+——-+
And you won’t be able to create new admin user because you don’t have appropriate MySQL tables
wp user create admin [email protected]… Read the rest