for user in *
chown -R $user.$user /home/$user/public_html/*
tidy -asxhtml -numeric < index.html > index.xml
A fun thing to do with ram is actually open it up and take a peek.
This command will show you all the string (plain text) values in ram
sudo dd if=/dev/mem | cat | strings
This will make a log of a terminal session
Create a specific log of a session in a file called typescript or specify the filename with:
Exit the session with control-d.
usage: namei namei -m /path/to/file/or/dir This will show the permission bits of each file type for every directory up to the last file or directory that you provide. Super handy for finding permissions issues that you can not see readily
namei -m /path/to/file/or/dir
This will show the permission bits of each file type for every directory up to the last file or directory that you provide. Super handy for finding permissions issues that you can not see readily
The hostname (host.domain.tld) resolves to . It should resolve to x.x.x.x. Please be sure to correct /etc/hosts as well as the ‘A’ entry in zone file for the domain.
Some are all of these problems can be caused by /etc/resolv.conf being setup incorrectly. Please check this file if you believe everything else is correct.
Here are the steps that you should work through to solve this issue.
1. Follow the instructions that cPanel has provided by checking to see if you can solve this issue using WHM provided tools. Login to your server’s WHM (not cPanel) by going to https://[YOUR SERVER IP]:2087 in your web browser.
2. You probably see the error now, go ahead and close it for now and scroll down the left hand Functions Menu until you find the heading ‘DNS Functions’. Click on ‘Add an A entry for your hostname’. WHM will try to analyze your hostname and then present you with a button to click that says Add the entry, go ahead and click on that. WHM should automatically try to add the relevant A record for your hostname to the DNS zone present on your system.
3. Go ahead and logout and then log back in to WHM to see if the message returns. Look to the top of WHM to see the “Logout(root)” link. Optional Tip: If you don’t like logging into and then out of WHM while testing the fixes you can instead login to your server via SSH and whenever you are ready to test simply run the following command:
This command will send you an email immediately if your settings are still incorrect.
4. Hopefully that worked, but if not, we should go ahead and edit your /etc/hosts file just in case. Login to your system via SSH. Use your favorite text editor to make sure that your /etc/hosts file looks something like this.
xx.xx.xx.xx myserver.mydomain.com myserver
If you would like more information on the structure of the hosts file type ‘man hosts’ as the structure of this file is outside of the scope of this document.
5. Use your preferred method of checking for the message again. Has it returned? Are you sure that your server is using the proper resolvers? Make sure that your /etc/resolv.conf has the following within.
Let’s go ahead and test for the message again. Did it return? In this case it sounds like the domain name servers for your domain are not configured to be this server. Is it possible that they are configured to be another server? We can use dig from within the shell to try and find out. Try this:
dig +noall +answer +additional mydomain.com NS
Here are some example results:
$ dig +noall +answer +additional softlayer.com NS
softlayer.com. 86382 IN NS pdns6.ultradns.co.uk.
softlayer.com. 86382 IN NS pdns4.ultradns.org.
softlayer.com. 86382 IN NS pdns2.ultradns.net.
softlayer.com. 86382 IN NS pdns1.ultradns.net.
softlayer.com. 86382 IN NS pdns5.ultradns.info.
softlayer.com. 86382 IN NS pdns3.ultradns.org.
pdns2.ultradns.net. 86103 IN A 188.8.131.52
pdns1.ultradns.net. 86103 IN A 184.108.40.206
pdns1.ultradns.net. 86103 IN AAAA 2001:502:f3ff::1
pdns6.ultradns.co.uk. 86275 IN A 220.127.116.11
pdns5.ultradns.info. 82929 IN A 18.104.22.168
pdns4.ultradns.org. 65318 IN A 22.214.171.124
pdns4.ultradns.org. 65318 IN AAAA 2001:502:4612::1
pdns3.ultradns.org. 65318 IN A 126.96.36.199
In the most simple of setups, the IPs listed in your results should match the IPs of your server. If they do, then everything should be working at this point. If not then you are using name servers that are not within your system and you will need to update them with the relevant A record.
6. Login to WHM and add an A record with your server’s main IP Address into the Main >> DNS >> Add an A Entry for your Hostname.
If you are using some other name servers, you will need to contact the Administrator of that system to ask how you may add additional DNS Records.
Also add an entry for the subdomain host.domain.com inside the dns file for domain.com; and the warning should not repeat. I have explained all the methods, but usually adding a DNS entry for the hostname inside the server may also help.
– Secure SSL https://sitename.com:2087
Notice: Root user should only ever login using the secure HTTPS login!
– Regular http://sitename.com:2086 and http://yourdomain.com/whm
– Secure SSL https://sitename.com:2083
– Regular http://sitename.com:2082 and http://yourdomain.com/cpanel
– Secure SSL https://domain.com:2096
– Regular http://domain.com:2095 and http://yourdomain.com/webmail
update cpanel license
Login to https://manage2.cpanel.net/addlisc.cgi Add IP, then login to server and run:
For those pesky Cpanel email error regarding CPUWATCH
vim /var/cpanel/cpanel.config ‘extracpus=8’
or whatever number of cpu’s are on the server
do not use /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings
Also, Kill off the existing pkgacct/cpbackup processes and upcp to the latest release.
There’s a reason why cp is aliased to cp -i in _root’s_ .bashrc and .cshrc/.tcshrc.
After all, do you really want root to be able to overwrite a file without checking?
There is a way around the problem that retains the copy protections in root’s shell. Here’s how:
Backslashing the command temporarily avoids the alias done in the shell but does not permanently remove the protection.
This blinks the LED on the interface for five seconds–without interrupting network traffic.
ethtool -p eth0 5
supported only by the following drivers:
This will run top once write the output to a file and exit. The command top can also be run so that it will give multiple reports.
top -b -n1 > /tmp/top.txt
To run top 5 times and wait 5 seconds between each output the command would be:
top -b -n5 -d5 > /tmp/top.txt