EZ Linux Admin random header image

Entries from November 2009

Tar and untar

November 27th, 2009 by EZ linux · 1 Comment

To get the files out of a tarball, you can use the following commands:
tar xvf something.tar
If the tarball has also been gzipped (compressed), you can use the following command:
tar xvfz something.tar.gz
If you only want certain directories from the tarball, do this:
tar xvzf something.tar.gz */dir.you.want/*
If you have a .tar.bz2 file, then you need bzip2 installed [...]

Click to continue →

Tags: Linux Commands

Creating a SSH key

November 26th, 2009 by EZ linux · No Comments

ssh-keygen: password-less SSH login
SSH is often used to login from one system to another without requiring passwords.
This requires you generate your own personal set of private/public ssh keys.
ssh-keygen is used to generate that key pair for you. Here is a session where your own personal private/public key pair is created:
root:~> ssh-keygen -t rsa
Generating public/private rsa [...]

Click to continue →

Tags: Linux Tricks

Have root logins emailed to you

November 24th, 2009 by EZ linux · No Comments

1. Login to your server and su to root, unless you logged in as root already.
2. cd /root (unless your default login folder is already root)
3. pico .bashrc (or use your favorite editor)
4. Scroll to the end of the file then add the following:
echo ‘ALERT – Root Shell Access (YourserverName) on:’ `date` `who` | mail [...]

Click to continue →

Tags: Linux Security · Linux Tricks

Need space on a cpanel server?

November 10th, 2009 by EZ linux · No Comments

Here is some common places you can find some junk to remove:
find /backup/cpbackup/daily -name core.* -exec rm {} \;
find /backup/cpbackup/daily -name *.*.mbox:2, -exec rm {} \;
find /backup/cpbackup/daily -name *.msg” -exec rm {} \;
find /backup/cpbackup/daily -name *.msg” -exec rm {} \;
find /backup/cpbackup/daily/ -name *.*.dwhs1234.dwhs.net:2, -exec rm {} \;
find /backup/cpbackup/daily/ -name *.*.dwhs1234.dwhs.net:2,* -exec rm {} \;
Basically .core [...]

Click to continue →

Tags: Cpanel and WHM · Linux Tricks

PHP handler SuPHP

November 9th, 2009 by EZ linux · 1 Comment

Setting your PHP handler to SuPHP, which will cause PHP scripts to run as the user instead of “nobody”.
Note that it has stricter permissions requirements than the other handlers–files must be 644, directories 755

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts · Linux Tricks

How to find a spammer using nobody on a cpanel server

November 5th, 2009 by EZ linux · No Comments

There is two ways I know to accomplish this, the first seems to be better but I am still testing it out.
The first way is another great script from Script Mantra called Sendmail Logger. Once installed and php has Mail Headers compiled with it then you can see easily whats being sent through nobody or [...]

Click to continue →

Tags: Cpanel and WHM · Linux Tricks