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

30Mar/090

Frequently used Linux one-liners

I just submitted a couple of one-liners that I frequently use to Command-line-Fu.

Find brute force attempts on SSHd - Searches the /var/log/secure log file for Failed and/or invalid user log in attempts.
[root@empulse ~]# cat /var/log/secure | grep sshd | grep Failed | sed 's/invalid//' | sed 's/user//' | awk '{print $11}' | sort | uniq -c | sort -n


List SMTP connections by host - Searches /var/log/secure for smtp connections then lists these by number of connections made and hosts.
[root@empulse ~]# cat /var/log/secure | grep smtp | awk '{print $9}' | cut -f2 -d= | sort | uniq -c | sort -n | tail

29Mar/090

Command-line-Fu

If you haven't seen this site you need to check it out. Command-line-Fu is running list of submitted Linux one-liner commands.  Some of these are really cool and you can of course submit your own for peer review.

Here are a couple of examples you may find.

Update twitter via curl

[username@computername ~]# curl -u user:pass -d status="Tweeting from the shell" http://twitter.com/statuses/update.xml

List of commands you use most often

[username@computername ~]# history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
Tagged as: , No Comments
29Mar/090

Linux Security Quick Reference Guide

I just found this quick reference sheet on Linux security topics from Apache and DNS security to  crucial system files, tcp wrappers, and configuring syslog. This document from LinuxSecurity.com is available as a pdf download is provided below.

Linux Security Quick Reference Guide (pdf)

Excerpt: "Regularly audit your systems for any unauthorized and unnecessary use of the setuid or setgid permissions."

Quick tip: Find all setuid and setgid programs

root# find / -type f -perm +6000 -ls

Tagged as: , No Comments
27Mar/090

How do you linux? Contest

What do you do with Linux? is the question being asked by howdoyoulinux.com, who is having a video contest describing what you do with Linux. We all the great things you can do with Linux from a hardware firewall/router to a home theatre system. $2,000 and other prizes will go to the winners.

http://howdoyoulinux.com/

Filed under: Linux No Comments
25Mar/090

How Vaccuum Tubes Are Made and Used, Explained in 1942

This is really cool.  Gizmodo has an ariticle with videos from the 40s on how vacume tubes were made. These were put together by hand.

How Vaccuum Tubes Are Made and Used, Explained in 1942

Filed under: Uncategorized No Comments