June 12, 2012

DNS / IP Address Script for WordPress Blogs

(Note: this allows us to pull IP addresses from DNS names...)

#! /bin/bash
for line in `cat ./IP_List1.txt`
echo "Looking up server IP of $line"
host "$line"|grep 'address'|cut -d ' ' -f4 >> ServerIP.txt
echo "$line `host $line|grep 'address'|cut -d ' ' -f4`" >> DNSIP.txt

Posted by jlwalsh at 03:09 PM | Comments (0)

May 30, 2012

Managing Kerberos Credentuals for Xgrid

So, one of the issues we've encountered in the past regarding Xgrid and scripting out job progress and information results from the fact that Xgrid uses LDAP and Kerberos for EVERYTHING, which means you'll a ticket to do anything. We've whipped out a simple script that does this (admittedly, this is a hack, but it works for temporary usage...):
if ( $ARGV[0] eq "-k" || $ARGV[0] eq "--k" )

open PASS, "/path/to/encrypted/pass/krb5.pass" or die $!;
while ()

my $cipher = new Crypt::Blowfish "my key";
my $plaintext = $cipher->decrypt($_);
my $krb5_princ;
$krb5_princ = Authen::Krb5::parse_name('pcastuser');

my $krb5_sprinc = Authen::Krb5::sname_to_principal(
my $cc = Authen::Krb5::cc_default();


This allowed us to extract a listing of submitted Xgrid jobs (e.g, Podcast Producer) for MTube migration.

Posted by cdgrieb at 09:56 AM | Comments (0)