Apple Open Directory Migration Utility

The information here will allow you to send emails to all of your Open Directory users and reset their passwords

Go here to download the utility:


If you are attempting to migrate Open Directory from one server to another and don’t want to keep the same name of your server this might be of use to you.

The caveat is that this technique requires users to experience a password reset.

The good news is that this utility also automatically sends out email notifications so users know that they have had their password changed.

It uses Perl to iterate through your Open Directory on your Apple Open Directory Server.


Mavericks comes by default with Net::LDAP and use Net::LDAP::Extension::SetPassword but does not come with use Net::SMTP::SSL

Net::SMTP::SSL is a Perl Module used to send emails using SSL. The script is set to use Google as the SMTP server so you will need to adjust it to work with your mail servers if you aren’t using Google.

To install Net::SMTP::SSL under OS X 10.9.5 Mavericks, follow these steps:

Open the Terminal app and type these commands followed by the key:

$ sudo perl -MCPAN -e “shell”

When prompted whether you want automatic configuration, answer ‘yes’.

If prompted how you want to install the system may ask about a lib or sudo… type ‘sudo’ and hit .

At the CPAN> prompt type the following and then hit :

install Net::SMTP::SSL

When it finishes, type exit and hit .


Before you run the scripts it is a good idea to configure them to work with your environment.

copy the sample.oditerator.config file, set the variables to work for your environment,

and then rename it to: oditerator.config

These are the variables that need to be configured:

$base=”dc=MyComputerName,dc=local”; $diradmin_username=’diradmin’; $diradmin_password=’supersecretpassword12345!!!!’; $from_email=’‘; $from_email_password=’supersecretemailpassword2015!!!!’;
$smtp_server=’’; $smtp_port=’465′; $system=”Development Server”; $url=”http://localhost”; $helpdeskurl=”http://help.MyComputer.local“; $helpdeskemail=”test1\”; $helpdeskcontact=”Test Help Contact”; $extra=’2015!’;


Once your scripts are configured, run:


Leave a Reply

Your email address will not be published. Required fields are marked *