Eliminating Internet Security Warning in Outlook 2007

May 12, 2014

Have you ever gotten this pesky little notification from Outlook each time you first open it up and perform a Send/Receive operation?

I did until I realized what Outlook was trying to tell me. In this article I make use of GoDaddy’s SecureServer mail server settings, but if you are encountering this error, it’s more than likely for the same underlying reason.

For a time I connected to GoDaddy’s servers without using SSL, so when I converted I left my connection urls the same, just changed up some ports and set Outlook to use SSL. Well in doing I made Outlook mad at me. It started telling me that GoDaddy’s certificate couldn’t be validated. Well that didn’t make any sense, because well, it’s GoDaddy. So I did some digging.

Since SSL certificates are only good for the domain name specified when purchasing them (unless it’s a wildcard certificate, but that’s another story). When I looked really carefully at the certificate, I noticed it was issued to pop.secureserver.net. Well that url isn’t being used in my Outlook connection settings, so I updated my settings (incoming mail server url in this case) to match the url that the certificate is issued to and voila.

For those not using GoDaddy, the url you should be using is listed in the Issued To field when you click on “View Certificate”. That field must match in your Outlook settings, otherwise, you will get this beautiful message.





Setting Up Fail2Ban on Ubuntu to Monitor SSH

May 11, 2014

Why use Fail2Ban? Because numerous unknown individuals may be attempting to connect to your server or workstation through SSH.

Sounds good, how do I set it up?

1. Start by installing Fail2Ban:

sudo apt-get install fail2ban

2. We will want to make a backup copy of the original config file before we start editing:

sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.conf.orig

3. Now let’s edit the configuration file. Open it in your favorite text editor. (I chose nano):

sudo nano /etc/fail2ban/jail.conf

4. I like to add my personal ip address to the ignoreip section to prevent myself from getting locked out. This can be done by editing the ignoreip line within the config file. Space separate the whitelisted domains or ip addresses.

ignoreip = mydomain.com

5. I like to decrease the maxretry value to 2. This will give me two attempts for connecting from an ip or domain other than my own. Any more than two I feel is me having a really bad day or a hack attempt. Edit the line that states maxretry = 3 to the following:

maxretry = 2

SSH monitoring is enabled by default, so there shouldn’t be much else to do for basic setup at this point. If you want to change the logging level or the location of the log file you can edit the fail2ban.conf file.

6. Now just restart Fail2Ban and you should be all set:

sudo service fail2ban restart

jQuery contains() – May not do what you think it does

May 10, 2014

As I was writing some javascript I needed to determine if a string was contained within the value of an element.

So, I started out with the following:

var myValue = $(“#myElement”).val();

The I proceed to check if my specific string was in fact part of myValue. So I kept coding:

if (myValue.contains(“magicString”)){



But I never got my “Test” alert message. Why?

Because contains didn’t do what I thought it would. It’s meant to be used with DOM elements. Once I read the documentation it all became clear.

To start contains requires two arguments and looks like: $.contains(container, contained). It verifies if the second element (second parameter) is a descendant of the first element (first parameter). Since it’s looking for a descendant, location doesn’t matter. As long as the second element contains the first element somewhere it will return true.

So now I still needed a way to see if my string was contained in myValue… so I did some research this time and came up with the following:

if (myValue.indexOf(“magicString”) > -1) {



This time I got my test message. This is the closest thing javascript has built in to verify if a string is contained within a value. If the string exists in the value, indexOf will return the index of that string (which will be greater than 1) and thus we have a work around.

Disabling SSH Login for the Root User

May 10, 2014

Login to your server as a user with sudo capabilities.

Once logged it, you will want to edit the /etc/ssh/sshd_config file with your favorite editor to prevent root access (I chose nano):

sudo nano /etc/ssh/sshd_config

Look for the line that contains PermitRootLogin yes and change it to the following:

PermitRootLogin no

Save your changes and then restart SSH:

/etc/init.d/ssh restart

Add New Sudo User on Ubuntu Using Command Line

May 10, 2014

First start by creating the user from your root account (This command will prompt you for the password and other user related information):

root@yourdomain.com:~# adduser username

Next type the following command and hit Enter:


Now look for the section where you see root ALL=(ALL:ALL) ALL. We want to duplicate this line for our new user we just created so the type the following just below that line and save your changes:

username ALL=(ALL:ALL) ALL

Now login as your new user:

ssh username@your_server_ip_address



Converting a Subversion Repository to a Git Repository

April 28, 2014

Recently I was tasked with converting some Subversion repositories to Git repositories. (In particular GitHub) I was to keep all the original check-in details and map those details to our user’s new GitHub user accounts.

There are a few things to keep in mine when converting from one repository to another. The most important aspect of the conversion is that you will need to tell the Git repository who it was that performed the check-ins on the subversion repository.

To complete the conversion process, follow these steps:

  1. Create a new file called authors.txt. (I will explain the contents of this file below)
  2. Create a new folder for the Git repo to reside in.
  3. Open a Git Shell command window and execute the following command. This will effectively download the SVN version of your repository and convert it to a GIT repository using the authors.txt file to map user information between the two respositories.o   git svn clone https://yoursvnrepository.com/repository –no-metadata –A C:/DirectoryToAuthors/authors.txt C:/DirectoryToNewGitRepo/GitRepo
  4. Commit and sync your Git repository. In my case, I used the GitHub for Windows application. This allowed me to drag my new Git repository folder to the windows application and sync it.


Contents of the authors.txt file

The authors.txt file is the map between your SVN user account information and your Git user account information.

You will want to create a file that has the following format: (Note: The GitEmailAddress for GitHub is your publicly accessible email address, not the address you sign in with)

SvnUsername = GitUsername <GitEmailAddress>

Ex: nathan = Nathan Renico <nathan@renicorp.com> or SERVER\nathan = Nathan Renico <nathan@renicorp.com>