Month: March 2009

Whois info via GeekTools

whois -h whois.geektools.com g33kinfo.com


Reset Permissions in a Cpanel Users Directory

#!/bin/bash cd /var/cpanel/users for user in * do chown -R $user.$user /home/$user/public_html/* done


Convert HTML file into valid XML

tidy -asxhtml -numeric < index.html > index.xml


What Strings Values are Running in RAM

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


Script Command

#script 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: script filename Exit the session with control-d.


Show Permission Bits

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


DNS Error “IMPORTANT: Do not ignore this email.”

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. vim…


Some Cpanel Commands & Info

Login Info: # WHM – 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 # Cpanel – Secure SSL https://sitename.com:2083 – Regular http://sitename.com:2082 and http://yourdomain.com/cpanel # Webmail – 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…


Using cp Command without Interaction

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: \cp -f Backslashing the command temporarily avoids…


Which physical interface is eth0?

This blinks the LED on the interface for five seconds–without interrupting network traffic. ethtool -p eth0 5 supported only by the following drivers: ewrk3 s2io sky2 tg3 e100 pcnet32 bnx2 skge e1000 sk98lin ixgb