Tuesday, March 24, 2009

Restarting the Blackberry Enterprise Server Services

Posted by Brian Bohanon

Sometimes the Blackberry Enterprise Server (BES) seems to stop communicating and the devices will no longer be able to send/receive messages or reconcile the calendars and other items. I am yet to identify why this happens, but you can identify it by going into the Blackberry console and viewing the users list. If none of the devices have contacted the server (last contact time), then the server has probably lost communication. To rectify this problem, the services can be restarted.

The BES services need to be restarted in a specific order. Go into the Services console on the server (Start->Run, type in services.msc). The order to restart these services is:

Saturday, March 21, 2009

Linux Mint - Great Linux Distribution

Posted by Brian Bohanon

I have spent most of my years working with RedHat /Fedora. For the past year, I have been working with Ubuntu. Last night I found Linux Mint. This is the most flexible, easiest-to-install desktop Linux I have ever used. I have only been running it for a few hours, and I'm sure I will come across something that I need that I can't do. However, this is the best distro I have used in a long time.

Tuesday, March 17, 2009

How-To Install Nagios on Ubuntu Linux

Posted by Brian Bohanon

After many attempts and how-tos, I was finally able to get Nagios installed on (Ubuntu) Linux. My first attempt was downloading an appliance from Jumpbox, then Fedora 10, and finally, Ubuntu. This how-to will be broken out into three parts:

  1. Download and install Ubuntu
  2. Download, install, and configure Apache
  3. Download, install, and configure Nagios

Tuesday, March 10, 2009

VBScript to Map Drives Based on Group Membership

Posted by Brian Bohanon

Often times, drives will need to mapped for users in a specific group. The script below uses a case statement to check for group membership and maps the drive accordingly. To modify the script simply change the group name in the quotes and put the correct drive letter and UNC path for the drive mapping.


Saturday, March 7, 2009

How to Install Printers Using Group Policy

Posted by Brian Bohanon

Deploying printers in Windows 2003 using Group Policy was a pretty lengthy process for me to figure out. Microsoft's documentation on this process is a bit cryptic, so I thought I would simplify the instructions. The prerequisites for this are the server must be R2 and the domain functional level must be Windows 2003. The steps I followed to accomplish this are:

  1. Publish the printers using the Group Policy Management Console (The print management console can also be used and is distributed as part of R2)
  2. Copy the PushPrinterConnection.exe (located on the R2 server in the PMCSnap directory under the Windows directory
  3. Add the PushPrinterConnection.exe to the computer start up scripts
  4. Use VBScript to set the default printer for the specified computer
The first step is pretty straight forward. Using the GPMC, I added the printers to the existing group policy for these computers. These computers are Windows XP computers, so the printers must be assigned to the computer (per Microsoft: http://technet.microsoft.com/en-us/library/cc722179.aspx).

The next step was to copy the PushPrinterConnection.exe executable to a central location (I used the domain scripts share - \\domain\sysvol\domain\scripts). This file is used by the computer to essentially execute the RunDLL32 PrintUI.dll functionality that is available with the command line. The executable can be added to the computer start up scripts. I added the -log option so I could troubleshoot any problems with the printer installation.

Because there are many printers and many computers located in different areas of the office, different computers will need different printers to be set as the default. The script to accomplish the is below and labeled "Set Default Printer".

The final problem that I ran into with adding the printers through group policy was the fact that on the surface, you can't remove the printers. The help desk staff was re-imaging the machines to get rid of the printers. I wrote a script that will do this below labeled "Remove Deployed Printers". The easiest way I could find to do this was to have a new group (maybe, "Clean Machines") and assign this script as a startup script using group policy. This way, just changing the computer's group membership to "Clean Machines" and rebooting it would remove the deployed printers upon reboot.

Note: The printers are actually added into the registry key
HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections
The script I wrote simply deletes this key. The printers could of course, be deleted from the registry manually.


'Set Default Printer

Dim WshNetwork

Set WshNetwork = WScript.CreateObject("WScript.Network")

'Begin Printer installation
WScript.Sleep(35000)
Select Case WshNetWork.ComputerName

'Choose which printer to install for which computer to set as default
Case "WS-10440"
WshNetwork.SetDefaultPrinter "\\Server\PRN-224"
Case "WS-10525"
WshNetwork.SetDefaultPrinter "\\Server\PRN-224"
Case "WS-10531"
WshNetwork.SetDefaultPrinter "\\Server\PRN-225"
Case "WS-10710"
WshNetwork.SetDefaultPrinter "\\Server\PRN-224"
End Select


'Remove Deployed Printers

On Error Resume Next

Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."

strKeyPath = "SYSTEM\CurrentControlSet\Control\Print\Connections"

Set objRegistry = GetObject("winmgmts:\\" & _
strComputer & "\root\default:StdRegProv")

DeleteSubkeys HKEY_LOCAL_MACHINE, strKeypath

Sub DeleteSubkeys(HKEY_LOCAL_MACHINE, strKeyPath)
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys

If IsArray(arrSubkeys) Then
For Each strSubkey In arrSubkeys
'MsgBox strKeyPath & "\" & strSubkey
DeleteSubkeys HKEY_LOCAL_MACHINE, strKeyPath & "\" & strSubkey
Next
End If

objRegistry.DeleteKey HKEY_LOCAL_MACHINE, strKeyPath

End Sub

If this post was helpful or if you have any questions, please leave a comment and I will get back to you as soon as possible.

Thursday, March 5, 2009

Windows Network Load Balancing: MAC (Layer 2) Address Resolution

Posted by Brian Bohanon

I was asked today (by a very astute fellow) what MAC address clients receive when connecting to Exchange Client Access Servers using Windows Network Load Balancing. This person had a very good understanding of how networking and load balancing works, and as I was describing how the system used a shared name and a shared IP address, he wanted me to explain what MAC address was added to the ARP (Address Resolution Protocol) table in clients. Which physical machine's MAC address is used? The answer is actually, neither.

This was not a question I could answer at that time. However, after a quick query on Google and a little reading, I now have a much better understanding of how this works.

Windows Network Load Balancing uses a "virtual" MAC address that is derived from a combination of the "cluster adapter" IP address and the priority of the node within the NLB configuration. For example, the cluster adapter IP address is 5.5.5.5 and there are two nodes (node 1 and node 2). The MAC address used when a client hits node 1 would be 02-01-5-5-5-5. The MAC address for the second node would be 02-02-5-5-5-5. The format for this MAC address is 02-h-5-5-5-5, where h = the priority number of the node (set in NLB) and 5-5-5-5 is based on the IP address of the cluster adapter (shared by both nodes).

This is actually a pretty cool way to do it because you can scale nodes without worrying about physical MAC addresses because, the MAC addresses are virtual and thus don't require physical hardware.

Source: Microsoft (http://technet.microsoft.com/en-us/library/bb742455.aspx)

Telnet: Temporary Failure in Name Resolution: Illegal Seek

Posted by Brian Bohanon

When using a Windows client to telnet to a Linux server, I kept getting the following error:
temporary failure in name resolution: illegal seek
The logs on the Linux server showed that the client was connecting, but they were never presented with a login prompt. After checking the Windows client's name resolution I checked name resolution on the Linux server. Everything worked properly on the Windows clients, but I got an error on the Linux server when trying to perform a nslookup on the linux server for the Windows client's IP address. The error I was receiving when I did the nslookup on the Linux server was ** server can't find 10.20.168.192.in-addr.arpa: SERVFAIL


The Linux server looks queries a Windows 2003 server for DNS. Upon seeing the above error from nslookup I realized that the server couldn't do a reverse DNS look up for the client. After checking the DNS server I noticed that there was not a reverse DNS zone setup for the subnet that the client was in. I set up a revers lookup zone for the subnet and the clients were able to successfully telnet into the Linux box.

The real question is why? Why is Linux doing a reverse DNS look up for telnet connections? Incidentally, clients could SSH to the Linux server without any problems. I found a pretty sufficient answer from "The Answer Guy" at this site. He essentially explains that because telnet is an insecure protocol, Linux tries to counteract this by doing a "double reverse look up". This would help explain why SSH would work.

Tuesday, March 3, 2009

Exchange 2007 - Finding Users with Items Over 180 Days

Posted by Brian Bohanon

I am currently working on a migration from an in-house Exchange 2007 infrastructure to a hosted environment. As part of this move, there are new restrictions being placed on the mailboxes. One of these restrictions is that all mail over 180 days old is automatically deleted from the system. Prior to migrating the mailboxes, I need to know how many and which users have items older than 180 days.
Finding this information was a two-step process:

  1. Export all of the mailbox folder statistics to a CSV file
  2. Scrub the resulting data with Excel to get a list of the users and their departments with mail items over 180 days old
The first part of this process was to export the folder statistics for each mailbox. I accomplished this using a combination of PowerShell cmdlets:

get-mailboxdatabase | get-mailbox -resultsize unlimited | get-mailboxfolderstatistics -folderscope all -includeoldestandnewestitems | export-csv mailbox_stats.csv

The cmdlets break down this way:
  • get-mailboxdatabase fetches each database (this infrastructure employs multiple databases)

  • get-mailbox runs through each mailbox in the current database

  • get-mailboxfolderstatistics returns specifics about the folders in the mailbox. -folderscope all returns information about each folder under the top of information store and -includeoldestandnewestitems includes the dates of the oldest item in the folder and the newest item in the folder

  • export-csv obviously exports the results to a CSV file
Once the information is in the CSV format:
  1. I used a filter on the OldestItemReceiveDate field with "before" criteria for 180 days prior to the cut-off date

  2. Once I had the list of results narrowed down to those with mail items over 180 days, I used some VBA functions to extract the user name and the department (the users are placed into OUs by department and the result of the get-mailboxfolderstatistics cmdlet is the full "path" to the users folder including domain and OUs, so it was pretty easy for me to get their department)

  3. I then copied the results to a new list and used an advanced filter on this list to get unique records only, and I had the final list of users with items over 180 days.

Monday, March 2, 2009

Online Backup Software Reveiw

Posted by Brian Bohanon

Have you ever thought about what you would lose if your computer crashed or was stolen? Would it be irreplaceable pictures of your family, or vital contact information for your business clients? Some people assume copying their information to a USB storage device or a CD is the best solution, but a better one exists. Online backup providers offer many benefits which physical copies simply can’t:

  • Automated backups: You never have to remember to backup your data up
  • Online storage: You don’t have to worry about physical damage to your backups
  • Multiple computers: You can backup multiple computers to one location
  • Easy restore/transfer of files: You can easily restore or transfer your files to your repaired or new computer
When choosing an online backup solution, there are a few things to look for:
  • What is the cost? Depending on the amount of space needed for your backups, you may be able to get this service for FREE. For additional storage these providers will only charge a small monthly fee.
  • How much storage do you need? The software will tell you how much storage you will need when you install them.
  • How viable is the company? There are many companies in the market, but there are only a few that are going to be around in 5 years, when you need to restore your files.
  • Does the software install on your computer? As part of the criteria for the recommended vendors, the breadth of supported operating systems must at least support Windows XP, Windows Vista, and Apple MAC OS X.
Once you choose your provider it will take about 1 hour to setup an account, install the software, and run the first backup. These are my top recommendations, but you may also wish to investigate online backup providers for yourself. The most important thing is to choose a company you trust and immediately backup your files!. If you have any questions about which software is right for you, please leave a comment or contact me directly on CrossLoop.

Company Web Site Cost Storage Rating Rating Explanation
Mozy http://www.mozy.com

Free


$4.95/Month

2 GB


Unlimited

5/5
Carbonite http://www.carbonite.com$49.95/YearUnlimited4/5 Only offers annual plan and no free service
iDrivehttp://www.idrive.com

Free


$4.95/Month

2 GB


150 GB

4/5 Doesn’t offer an unlimited plan
Elephant Drive http://www.elephantdrive.com

$4.95/Month


$9.95/Month

1 GB


2 GB

4/5 Doesn’t offer unlimited plan and is expensive for the storage that they do offer

Sunday, March 1, 2009

Changes to The Daily Admin Blog

Posted by Brian Bohanon

As I spend more time and effort keeping up and promoting my blog, I spend a lot of time looking at the design, functionality, and content. I can always improve the content, this is a never-ending cycle. Although I was please with the first look of this blog, I knew that I could do better. This post is a chronicle of the changes that I made to the design and functionality. Very few of these changes are my own work, so I will also take this opportunity to give credit to all of those that I learned and borrowed from.

The first and most obvious change was the template. I spent a lot of time looking through all of the "free" templates that are available from all of the various sources on the Internet. My original template was the "Rounders" template. This was a great template that I spent a lot of time customizing and learning how templates work. The skin that I finally settled on was from http://www.ourblogtemplates.com and is the "A Click Apart" template.

This transition was easier than I had anticipated. I removed all of the widgets and customizations from my "Rounders" theme and then uploaded the new template. This is one of the keys to a smooth transition that you don't find on the template sites: remove all customizations from your template prior to trying to install a new one.

Next was the header image. The template is displayed with a very attractive image, but I wanted to make the site more of my own than a copy. With this said, I used the GIMP to create an image of my own. I don't claim to be a graphic artist, but it turned out OK for now.

Once the basic layout was complete, I decided to start my "normal" customizations. These include the sidebar functionality. I don't use the Blogger Widget for search, I have found a nice script that does a great job from Tips for New Bloggers:


<p align="left">
<form id="searchthis" action="http://www.thedailyadmin.com/search" style="display:inline;" method="get">
<strong>The Daily Admin<br/></strong>
<input id="b-query" maxlength="255" name="q" size="20" type="text"/>
<input id="b-searchbtn" value="Search" type="submit"/>
</form></p>

Next comes the first of two scripts that I employ from phydeaux3. This particular script modifies the labels widget to be a customizable tag cloud. I prefer the tag cloud to the static label list because I use a lot of labels and the list takes up too much space for me. The changes are outlined very well by phydeaux3, so I won't go into that here, but I will show the only two changes that I needed to make: font colors.
var maxColor = [83,120,174];
var minColor = [153,153,153];

The next thing that I use from phydeaux3 is an archive calendar. I love this because, it too is intuitive to me and takes up minimal space. This actually uses the default archive widget, but the script customizes the existing widget. Pretty cool, because you don't have to do anything to get a sharp archive calendar.

The next sidebar customization is the addition of my LinkedIn badge. This is a simple script:

<a href="http://www.linkedin.com/in/brianbohanon"><img border="none" src="http://www.linkedin.com/img/webpromo/btn_viewmy_160x33.gif"/></a>

Sticking with the LinkedIn theme, I also added the LinkedIn Profile Popup. Aside from just getting it to work with Blogger (which can be seen in the post "How-to Add LinkedIn Profile Popup on Blogger"), I also had to change the theme to place the data:post.author at the top of the post (my preference, not required) and the style sheet for the data:post.author so that it is an <h4>. I had originally changed it to <h3>, but when viewed in Internet Explorer the font was much too large.

I always see the social bookmarks on really nice blogs and wanted to add this functionality to mine. I had a heck of a time trying to find this. Most all of the posts I found about this were using individual images hosted from another source with links and it was a big pain. Fortunately, I was able to find out not only the easiest, but probably the most thorough method. There is a site called AddThis that provides the code for the button on your site, stats about your button, and they keep up with all of the sites and links. This is great because I don't know (and don't care to know) every social web site on the web. This is a free service and took about 5 minutes to setup from registering on the site to putting the code in all of my posts. Part of the AddThis functionality is Digg, so I removed the individual Digg script.

Just to see what is happening on my blog when I'm not around, I signed up for http://www.statcounter.com which is a free service like Google Analytics. This too, was a super easy change that was just the matter of signing up for the service and adding some script to my site.

I also found a cool little SEO hack that will list the post title in search engines rather than the default site title. I can understand why this would drive more traffic, because in the past when I did searches for my own content it would show "The Daily Admin" in the Google results. This is a really simple change that makes a huge difference. I got this from Blogger Busters.

The last customization that was "new" to my blog was the "Read More..." functionality. I like this because it consolidates the posts on the main page which keeps things looking clean. This wasn't an easy on to tackle, it took quite a few times of trying different ways of doing this to find one that worked. The one that did finally work the way that I wanted it to was from BlogSpotTutorial and was actually the easiest that I had tried (I tried about 10 different ways to do this).

Another change that I made, hoping to drive a little more traffic to my site was to remove all of the embedded Scribd documents that I have been using and replace them with searchable text. Although Scribd provides a cool service, and I have had thousands of views for my documents, search engines can't index those when they are embedded on my site.

The last change (in correlation with removing my embedded docs) was to change the way I displayed code on my blog. In the past I did it in a very difficult way with several div tags and some inline styling, but that had to go. I wised up and created a div style that is present in all of my posts and only requires the following tags:
<div id='divCode'></div>
This makes it much easier for me to post code and less likely to want to embed the documents from Scribd.

WOW! Looking back on all of these changes, there were a lot. It was more than I thought. There are still some additional changes that I am looking into that will add some more functionality, such as previous and next buttons for my posts. I'm not sure that I can have this and the archive calendar coexist.

If you have any ideas or suggestions for improvements on the design of this blog, please feel free to leave a comment.



  © Blogger template 'A Click Apart' by Ourblogtemplates.com 2008

Back to TOP