Empulse Group a collection of notes from a sys admin, musician, and father

21Apr/090

Nice Cacti Install How To

RedHat / CentOS Install and Configure Cacti Network Graphing Tool

16Apr/090

Reset file permissions of RPM packages

UPDATE: YOU NEED TO RUN THE FOLLOWING COMMANDS IN REVERS ORDER!

So, --setperms then --setugids. This is because setperms will overwrite sticky bits if run after setugids.

A disastrous mistake anyone can make on their Linux server is to chown or chmod their entire filesystem.

You can reset the permissions of packages installed with rpm.

To reset file permissions:

[root@www ~]# rpm --setperms {packagename}

To reset ownership permissions:

[root@www ~]# rpm --setugids {packagename}
5Apr/090

Security Articles

Hacking-Gurus: Network and Server Security Blog really has some useful information documented.  Check out these articles.

Basic Linux Server Security

Linux Security Tools


SQL CheatSheet

5Apr/090

SQL Injection article

This is an article I found on Twitter from Hacking-Gurus on SQL injection. Check it out.

MySQL: Secure Web Apps - SQL Injection techniques

4Apr/090

One-Liners

Search for multiple processes in one command. Example in using multiple variables.

[root@empulse ~]# ps auxf | grep -P '(wincompd:|proftpd:)'

Lower the reserved disk space to 0%. By default Linux will reserve 5% of each file system as reserve free disk space.

[root@empulse ~]# tune2fs -m 0 /dev/hda5 remove reserved space

Compare two files on two remote file systems. I saw this on Command-line-fu.

[root@empulse ~]# diff <(ssh alice cat /etc/apt/sources.list) <(ssh bob cat /etc/apt/sources.list)