Sophos Duplicate IDs

I found my self in a large environment where someone decided to deploy an image with Sophos installed. This resulted in all the computers being seen as 1 single computer in the Sophos Enterprise Console.

This caused me to write the following scripts. sophosFindDuplicate.pl scan the IIS logs looking for duplicate GUIDs from computer. It will output the IPs of the machines. This command will let you remotely fix the machines.(Remeber to whitelist psexec in Sophos)

sophosFixDuplicate.cmd

sophosFindDuplicate.pl

IMAP Copy to local file.

I had a mail server that only supported IMAP, but their webmail interface is horrible. So I decided to write a small script to grab the email from the imap server and save it locally. In my case the local directory is the mail directory in cpanel so I can use gmail to grab the emails via POP3 to use gmail. The mail flow is:

imapscript

ReadyNAS Google Authenticator

I just finished configuration Google two-factor authentication on my ReadyNAS for ssh authentication. It works well so far.

You need to install the Root SSH Add-on from the forums so you can ssh into your readynas.


apt-get update
apt-get install mercurial make gcc apt-utils libc6-dev gdb libtag1-dev uuid-dev libpam0g-dev

The just follow these instructions
http://www.mnxsolutions.com/security/two-factor-ssh-with-google-authenticator.html

Macintosh Logon Scripts

Here is a set of Mac logon scripts I wrote for a Windows/AD environment. There are a set of plist files that launch perl scripts and different stages. The logon scripts are local and self-update from the sysvol directory.

edu.fitsuny.mac_logon_init.plist

edu.fitsuny.mac_user_logon.plist

mac_system_logon.pl

Network Shares Migration Script

Some times its just easier to use command line tools then using WMI. This simple script migrates out shared folder system into the new structure that is the teachers name with two folders underneath it.

migrate.vbs