Code Snippets

Wordlist Menu Tool for Backtrack 4 Final

I get really sick of trying to remember all the commands I use to work with wordlists so I had some free time and decided to finally get it all in one place.  I started out just gathering all my notes in a text file but then I decided to code up a menu to make the commands easy to access. Normally I would keep something like this just for my own use since I doubt any one would want it but I decided to release it anyway.

Technology Insights

Error(s) executing /usr/bin/nagios -v /usr/share/nagios/monarch/workspace/ nagios.cfg Permission Denied

Earlier in the week when moving Nagios from one server to another I ran into a bunch of random issues with Monarch which is the Nagios configuration file manager I use. After I got everything installed and thought that I was past any errors I ran a Pre Flight Test on the Nagios configuration files which returned an error. In the article below I describe in more detail the error that displayed, how I went about troubleshooting the error, and what I finally did to resolve the error.

Technology Errors

Can’t Locate JavaScript/ In @INC

The error detailed below is from the Apache error logs. The error displayed in the Apache error log after the first attempt to visit monarch.cgi for the first time. I had already installed the JavaScript::DataFormValidator Perl module but after initially installing the JavaScript::DataFormValidator Perl module I also installed Perl 5.10 in a different location than the Perl 5.8.8 that was already installed on the CentOS Linux server. Below I describe the error, how to install the JavaScript::DataFormValidator Perl module using the CPAN shell, and some minor modifications I made to the Monarch CGI scripts to use Perl 5.10 instead of Perl 5.8.8.

Technology Errors

mysql: grant all privileges on test.* to ‘root’@’localhost’ identified by ‘s3kr1t’

The below is part of the output when receiving an error attempting to install the Perl DBD::mysql module using the CPAN shell. I rarely use the Perl CPAN shell since most of the packages are available on CentOS, my typical Linux distribution choice for servers, using the yum package manager. In this case I was working on installing Monarch on a server at work to assist with Nagios file management. Monarch allows you to backup the entire Nagios configuration files with the click of a button. Monarch will also provide a visual view of any Nagios build errors, Nagios configuration files (including users, user groups, services, check commands, etc.,), and more. So when attempting to build the Perl DBD:mysql module via the CPAN shell I received some errors which I initially did not understand because they did not explain the specific issue however I eventually located the problem which ended up being easy to resolve. Below I describe the error in detail as well as information on how to resolve.

Technology Insights

Possible Errors When Moving Nagios From One Linux Server To Another Linux Server

I recently moved Nagios monitoring from one server to another and ran into a couple minor issues. I wanted to point out some of the errors and the steps I took to resolve those errors on a CentOS Linux server. The biggest pain about moving Nagios for me was the fact that I use Monarch to manage the Nagios configuration files and reconfiguring Monarch was a pain because of some of the Perl modules required and the fact that CentOS still favors Perl 5.8.8 instead of Perl 5.10 which includes some of the necessary Perl modules. Anyway once I got past the Monarch issues I still had some minor problems with Nagios which are pointed out below. The errors are from the Nagios web interface.