BIND MySQL DLZ 64 bit Linux compile

When trying to compile the Bind MySQL DLZ driver on a 64-bit Linux server, you need to specify the following environment variables in order to get it to work: export CPPFLAGS=”-I/usr/lib64/mysql $CPPFLAGS” export LDFLAGS=”-L/usr/lib64/mysql $LDFLAGS” export LD_LIBRARY_PATH=”/usr/lib64/mysql” Happy compiling!

Sending mail from command line using Mutt

I use this to attach reports (pdfs, etc) to emails in my scripts. Small Perl snippet: system(“/usr/bin/mutt -i $file_with_body_content -a $file_to_attach -s “Some Random Report $report_date” $mailto < /dev/null”); And since this has now bitten me twice, make sure that there are no variables with carriage returns at the end. In my case, both times… Continue reading Sending mail from command line using Mutt

Published
Categorized as Technical

Useful Networker Commands

For use with EMC (Legato) Networker… Move everything off of a specific volume onto another pool (Careful, does not take into account possible clones – add /cloneid somehow to the end. I haven’t been able to automate that yet): # for i in `/usr/sbin/mminfo -q “volume=OLDVOLUME” -r “ssid”`; do /usr/sbin/nsrstage -v -b NEWPOOL -s NETWORKERSERVERNAME… Continue reading Useful Networker Commands

Published
Categorized as Technical

Random Useful Scripts

Convert plain text to passwd crypt: #!/usr/bin/perl print “Enter the password you would like to use: “; $pass1 = <STDIN>; if ($pass1) { my $salt = join(”, (‘.’, ‘/’, 0..9, ‘A’..’Z’, ‘a’..’z’)[rand 64, rand 64]); my $cryptpw = crypt($pass1, $salt); print “The encrypted password suitable for passwd is $cryptpwn”; } Convert base64 encoded to plain… Continue reading Random Useful Scripts

Published
Categorized as Technical