dufault.info

Ramblings of a phone weenie, Linux sysadmin, and other things geeky

Check out my new article on itnewb: Easy Logins With SSH On Linux!

I wrote an article for a friends site, check it out: Guide To Easy Logins With SSH On Linux
I didn’t know that article writing took so long — the amount of writing, rewriting, critiquing, etc etc was a new experience. I’ll have to keep writing articles — teaching others is a good way to [...]

Logging all BASH commands to history, and keeping people from deleting/emptying it

Usually on Linux server, we have issues with logging the commands that our users are running, especially with BASH. BASH doesn’t log the commands as soon as they’re executed, and the user can do a number of simple things to prevent the log from ever being written to the disk, preventing you from knowing [...]

Billix

I  wanted to mention that I’ve been looking for something like for this a bit — a USB key that comes with a way to install multiple Linux distributions.  While at work, we primarily use Gentoo, we still have a Ubuntu server or CentOS install to do occasionally, and it would be nice to have [...]

Hotswap a SCSI, SAS, or SATA drive in Linux

There seems to be not a lot of information on Google about this, thus, I post.
At my work, the majority of our servers have hot-swappable drive bays — however, Linux doesn’t usually automatically notice the drive is gone. Worse, sometimes it doesn’t even notice new drives hooked up.
Now, SCSI and SAS both support hot-plugging [...]

Installing libtidy in PHP5 on a CentOS cPanel server

To install libtidy in PHP5, it’s really quite easy.
Make sure your /tmp directory doesn’t have something like noexec set on it, otherwise this would be more difficult.
Here’s the install command:
pecl install http://pecl.php.net/get/tidy-1.2.tgz
Find where your main php.ini file is:
root@server [~]# php -i|grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

Add the module to your [...]

The Linux Magic SysRq key

I find it shocking how many people don’t know about this neat Linux key combination that let’s you execute various low level commands regardless of the system’s state (as long as it’s running and hasn’t panicked.)
From the Wikipedia page:
It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem.
How [...]

Forcibly Triggering a Kernel Panic on Linux

This might sound strange, as people usually want to fix or prevent these from happening, I’m trying to test/ create a method of logging kernel panic messages to a remote logging server. All of the existing tutorials I found on the net were for Linux 2.4, or were incomplete.
My method involves creating a Linux [...]

Installing a grsec-patched kernel on a CentOS 5 or RHEL 5 server

Here’s my little guide for upgrading a CentOS server to a grsec-patched kernel. At the time of this writing, this was the latest stable grsec patch available.
Fetch the sources:
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.5.tar.bz2
wget http://grsec.linux-kernel.at/grsecurity-2.1.11-2.6.24.5-200804211829.patch.gz
Extract:
tar xjf linux-2.6.24.5.tar.gz
gzip -d grsecurity-2.1.11-2.6.24.5-200804211829.patch.gz
Patch the kernel:
patch -p0 < grsecurity-2.1.11-2.6.24.5-200804211829.patch
cd linux-2.6.24.5 && make clean && make mrproper
Copy the previous kernel config to use:
cp [...]