Unlock an Active Directory Account Using Mac OS X Directory Utility

Recent versions of OS X integrate well with Microsoft’s Active Directory. As an IT professional working in a primarily Windows-based environment, I can still perform most of my job just fine with a Macbook without resorting to Bootcamp or virtual machines. I do use Jump Desktop for remoting into servers to run Windows-only administrative tools though. One of those tools I frequently need to use is Active Directory Users and Computers. More and more though I’ve been using the native OS X Directory Utility to perform some of the tasks that I previously would have needed ADU&C for. This tool is more like the Active Directory Services Interface Editor (adsiedit.msc) than ADU&C because it presents you with all the attributes of an object without simple GUI buttons for common tasks. But that doesn’t mean it can’t be used for those tasks if you know how.

One common situation is unlocking a user’s account after too many invalid password attempts. To unlock an AD account using Directory Utility follow the steps below. Note: the screenshots below are redacted to hide any internal details of my workplace AD environment.

  • Launch Directory Utility(This handy app is hiding in /System/Library/CoreServices/Applications/)
  • Switch to the Directory Editor tab
  • Set the node to your domain rather than /Local/Default
  • Click the lock to authenticate with an account that has the necessary rights. This doesn’t need to be the same account you are currently logged in as.
  • Search for the user in question and then scroll down to the lockoutTime attribute. If this value is anything other than zero, the account is locked out.
Directory Utility
Directory Utility
lockoutTime
lockoutTime
  • Change the lockoutTime attribute to 0 and the user’s account is now unlocked.

Save SCCM Inventory Troubleshooting Information

A coworker asked me this morning if I remembered troubleshooting an SCCM file inventory issue a few years ago.  We had to create a special file that would cause SCCM to save software inventory information.  I barely even remembered doing it, much less what what the name the file and where to put it.  It took a little googling to track it down so I figured I'd write a quick blog entry for my own future reference since I no longer actively do SCCM administration. The short answer to create one of following files:

  • %systemroot%\system32\ccm\inventory\temp\archive_reports.sms  (32-bit)
  • %systemroot%\SysWOW64\ccm\inventory\temp\archive_reports.sms (64-bit)

When SCCM sees this file it will keep copies of the XML files that contain inventory scan information which would ordinarily be deleted.  You should delete this file when you are done troubleshooting or you will eventually run out of space.

You can find more details about this file as well as two other special SCCM files, no_sms_on_drive.sms and skpwi.dat, on this technet blog post.

GMail vs Outlook.com

In my last post I described migrating my email from Google apps to Outlook.com. My migration was successful but it only lasted around a week before I switched back to Google and paid the $50/year for EAS support. From a strictly email point of view I was pretty happy with Outlook.com.  I can't say I have a strong preference for either Gmail or Outlook.com.  I do find Outlook.com's sidebar ads more intrusive that Gmail's ads.  I never really even noticed the ads in my Gmail and now that I'm on the paid version of Google Apps for Business, I have no ads at all.

At first I thought I preferred the Outlook.com calendar.  It looks a bit nicer than Google.  The integrated weather forecast is a very cool feature.  But after using it for a while I'm not a fan of the animated drop down thing you use to move between mail, calendar, skydrive, etc.  It looks nice but takes more clicks.  I prefer the simple google toolbar.  Switching between day/week/month view in Outlook takes more clicks as well.  The Google calendar just seems to be faster to navigate in general.

I'm in grad school and last semester as an experiment I used Googe Drive/Google Docs for all my schoolwork.  Note taking, paper writing, etc.  It worked out really well, better than using a full office suite.  I never had to worry about saving my documents, or having them available from whichever computer or device I had on hand at the moment.  Google Docs has an integrated research tool that makes is incredibly easy to insert footnotes as references in your documents.  I also found that I prefer to submit my papers as PDF rather than DOCX or RTF, that way there is no issue with formatting or compatibility.  Google Docs can export your files as PDF, DOCX, RTF, and a few others.  I played around a bit with SykDrive/Office Web Apps and found that it doesn't do any of this.  Office Web Apps is a pretty nice suite but it is very basic and can't really compete with Google Apps yet.  Also, even after years of exposure, I'm still not a fan of the Office Ribbon.  Finally, there is no SkyDrive syncing app for Mac OS X which means I'm completely trusting my stuff to "the cloud" with no simple offline recovery options.  So even though I can still use Google Apps without Gmail, I just felt like I preferred the more integrated approach.

The final straw came when I was attempting to view a picture that my wife sent me and I got a message that my Silverlight plugin was out of date.  Hey, thanks for reminding me that I have Silverlight installed, I should remove that as soon as I get done moving my mail back to Google.

 

Migrating from Google Apps to Outlook.com

There was a lot of publicity about Google’s decision to drop support for Google Sync.  Google Sync is Google’s implementation of Exchange ActiveSync and it was a much better way to configure your gmail on an iPhone than the default method which uses IMAP.  EAS provides immediate push email and seems to be better than CALDAV/CARDDAV for syncing contacts and calendar information as well.  IMAP pulls down email every 15 minutes at best.

When Google dropped support for EAS, existing phones were grandfathered in.  However, I recently installed the iOS 7 beta on my iPhone and Google is treating it like a new phone, meaning they are not allowing me to use EAS any longer.  After a few hours of using IMAP I was already getting frustrated.  I started using Google’s Gmail app, which uses Apple’s push notification service to alert you that you have new email.  This was okay... the Gmail app has advantages and disadvantages over the native iOS mail app but I could live with it.  However, when I created an appointment in my google calendar using a browser and it still hadn’t synced down to my phone calendar after several hours I knew something had to be done.

For most Gmail users the options are limited.  You pretty much have to deal with it or change your email address and move to a new provider.  I was in good situation because I had been using Google Apps to host email for my kevinbecker.org domain.  I was on the free tier, which no longer exists but, once again, I am grandfathered in.  This means I had two options, both of which would let me keep my existing email address.  Option one is to upgrade to Google Apps for business which costs $50/year for each account but provides EAS support as well as some other perks.  The other option is to change to another email provider for my domain.  I found that Microsoft offers free domain hosting for Outlook.com mail services, which naturally includes EAS support, so I decided to give it a try.

I’ll give a quick overview of the basic process, followed by a detailed guide for those that are interested.  Any feedback is appreciated if I left anything out or if the process changes in the future.

Overview

  • Setup your domain at domains.live.com
  • If you want to move your Gmail to Outlook.com, don’t create your MX record yet, verify your domain with a TXT record instead
  • Recreate your email account for your new domain
  • Sign in to your new email account at Outlook.com and configure it to use POP3 to pull your email from your Gmail account.  This may take a very long time.
  • Export your Gmail calendar as an ICS file and import it into your Outlook.com account
  • Export your Gmail contacts to an Outlook formatted CSV and import them into your Outlook.com account
  • Change the DNS MX for your domain record to point to Microsoft’s SMTP server
  • Enjoy free EAS support for your mobile devices

Initial Setup

Go to domains.live.com  and create or sign in with an existing Microsoft ID.

Click “Add a domain” and enter the domain name you are using for Google Apps.

Choose “Set up Outlook.com for my domain”.  Don’t worry, this will not immediately change your mail.

You will get a message telling you that you need to prove ownership of the domain by creating a DNS record.  Do not do the “Mail Setup” portion yet.  This step changes your MX record to start delivering your mail to Microsoft instead of Google.  If you are ready to make the switch immediately then you can do this now, but I wanted to get everything configured first to make the switch more seamless.  So instead I did the optional "Prove Domain Ownership" step.  Once you’ve proven domain ownership you can setup your email accounts so everything is ready before you change the MX record.

Create the TXT record as described.  The details will vary depending on who is hosting the DNS for your domain.  My DNS is provided by hostmonster.com as part of my webhosting service.  If google is hosting your DNS then, presumably, they provide an interface for modifying records, if not you may need to move your DNS from Google to somewhere else like dyn.com.

Back to domains.live.com.  At some point, depending on DNS propagation times, you will be able to access the “Member Accounts” section.  Now you can create your email account so that it is ready to start receiving email as soon as the MX record is changed to point to Microsoft’s mail servers.

Once the account is created you can sign into it at Outlook.com using your full email address but it will not be recieving any email yet.  If your email address is not the same address that you used for your Microsoft ID when setting up the custom the domain, you may need to sign out and sign in again with the correct account.

 

Moving Your Mail

Sign into your Google Apps email and select the gear icon in the upper right and select “Settings”

Select the “Forwarding and POP/IMAP” tab along the top and verify that POP is enabled for all mail.

If you do not already have a second email alias for your account you will have to add one now.  Again, from the gear icon in the upper right, select “Manage this domain”

Go to Users and select your username and then select “Add a nickname”

Now sign in to your account at outlook.com

Click the gear in the upper right and select “More mail settings”

Select “Your email accounts” and add a “Send and receive account”

For the email address you must use the nickname you just created in Google Apps.  This is because Outlook.com thinks it is already hosting your primary email address, so to get your email from Google you’ll need to use the nickname.

Select advanced options and for the incoming POP3 server address use “pop.gmail.com” port 995.  Check “Require SSL” and “Leave copy of messages on the server”.  This way you can always go back to google if you decide that Microsoft is not working out.

The outgoing SMTP server is not important.

Your gmail should start to slowly trickle into your new outlook inbox.  It took me around 24 hours to get everything.

Once all my mail had migrated over, I had several hundred legitimate email messages that got moved to my junk folder.  After selecting them all and marking them “not junk” I then selected my entire inbox and marked it all as read.

Moving Your Calendar

The mail was the hardest part.  Moving your calendar is simple.

From your Google Apps calendar, click the gear icon in the upper right and select “Settings”

Select the “Calendars” tab and near the middle of the screen there should be an option to “export calendars”.

This will download a zipped ics file with all of your calendar info.

Now go to your Outlook.com calendar and select “Import”

Choose “Import into existing calendar” and select the file you just downloaded. (unzip it first)

Moving Your Contacts

Moving your contacts is very similar to moving your calendar.

From your Google Apps contacts, click the “More” button and select “Export”

The default is “all contacts” which might be excessive.  This will have anyone you’ve ever sent to or received email from.  I just exported “My Contacts” which is a group of contacts that I have specifically added.

For the format, choose “Outlook CSV”

This will download a CSV file.

Now go to your Outlook.com contacts (called People)

There is a box offering to add contacts from various sources, including Google.  I’m not sure what exactly would happen when synced with Google this way but we are making a clean break so select “Import from file” and select the CSV file that was just downloaded.

Make the Switch

Now it’s time to update your MX record.  Again, the details will vary depending on your DNS provider but basically you’ll need to delete any existing MX records that point to google and create the new MX record for Microsoft.  The details for the MX record are described in your domain management page at domains.live.com.  Be sure to sign in with the correct Microsoft ID.  That is, you may have to sign out of your new Outlook.com account unless it is the same account that you used when setting up the domain.  I also had a CNAME entry for mail.kevinbecker.org pointing to ghs.googlehosted.com which I deleted and recreated pointing it to go.domains.live.com.  If you want a similar setup you will also need to create the mail.yourdomain.com entry for your domain at domains.live.com under “Custom Addresses”  You can do this for multiple different services like mail, maps, skydrive, etc but I only wanted mail.

 Enjoy

That's basically it.  There may be a delay for your DNS changes but you can now set up your mobile device to use EAS for your new outlook.com address.  You will need to manually set the server to m.outlook.com.  Leave the domain empty and use "user@domain.tld" for your username.