inside the mind of a linux admin

simple foreach to kill multiple PIDs

Sometimes you’ll find a bunch of stale or malicious processes that need to be killed. When a killall won’t grab them, use this simple for loop to kill -9 each of them individually from the ps output. Simply replace the name= variable with the PID’s name or a string from the process list. # name="perl" […]

Read More

enable passive FTP in pure-ftpd

For users that are behind a firewall it might be required that you enable passive ftp in the customer’s ftp server and client. While enabling passive ftp in your ftp client is simple, doing so in your ftp server configuration files might be a bit tricky if you don’t know what you are doing. This […]

Read More

cPanel error: language cache is out of date

During an upcp, or visible on cPanel WHM you may encounter an error that says: Warning: language cache is out of date. It is being rebuilt now Can’t locate Class/Std.pm in @INC (@INC contains: /usr/local/cpanel /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi […] Compilation failed in require at (eval 1) line 3. …propagated at /usr/lib/perl5/5.8.8/base.pm line 85. BEGIN failed–compilation aborted at […]

Read More

Basic Security Auditing

/var/cpanel/accounting check /tmp for nobody check /etc/passwd /var/log/secure rkhunter # find / -perm +4000 > ~/suids      # searches for all suid files and outputs to ~/suids file Share on FacebookTweet

Read More

How to resize /tmp/tmpDSK to 1Gb

Sizes does matter! # umount -l /tmp # dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=1024000 # mkfs.ext3 /usr/tmpDSK # mount -o loop,rw,noexec,nosuid /usr/tmpDSK /tmp Share on FacebookTweet

Read More

Troubleshooting: cPanel internal PHP

Symptom: Internal cPanel/WHM pages are returning blank pages or index.php for download.

Read More

my color PS1 bash prompt

export PS1=”[\[\e[34;1m\]\u@\[\e[30;1m\]\h\[\e[39;1m\]: \w\[\e[0m\]]\$ “ Share on FacebookTweet

Read More

new “vpsfind” tool deployed

as one of my first projects, I decided to write a new and improved “vpsfind” script, which parses data from the system center and can be used to locate the parent vp node, the running status of the vps, the primary username, and primary IP address of any VEID. as of last week, testing has […]

Read More

cPanel file locations

A helpful reference guide of the files where cpanel/whm stores important information for everything including apache, exim, ftp, frontpage, sql, ssh, php, bind, whm account data, cp scripts, and other configuration files. click here. Share on FacebookTweet

Read More

Twitter: kireguy

Tweeter button Facebook button Myspace button