Accessing Windows shares from Mac OX is slow? This post gives some tips to speed up file sharing for Mac users.

For pre-Lion users in a corporate network, accessing Active Directory Windows shares can be a painful proposition. OS X 10.7 Lion provides this support through native utilities, but until the release of Lion, Apple has provided Mac users with built-in support for accessing Windows file sharing through the open source FreeBSD SMB library. Here are some tips for speeding up SMB in previous versions of Mac OS X.

Turning “notify off” in nsmb.conf ^

First, we have to enable the root user account, which is disabled by default in Mac OS X.

1. Go to System Preferences > Accounts > Login Options

2. Click “Join” (don’t worry, we’re not joining anything!)

3. Click “Open Directory Utility”

4. Click the lock and enter your credentials to make changes

5. Go to Edit > Enable Root User. If prompted, choose a secure password; if not, go to Edit > Change Root Password and choose a secure password

Mac Windows File Sharing - Be sure to enable this root user account

Be sure to enable this root user account

Next, we need to edit the nsmb.conf file to enact the changes:

  1. Open Terminal
  2. Enter “su root”
  3. Enter the root credentials
  4. Navigate to the /etc folder by typing “cd /etc”
  5. Enter “touch nsmb.conf”
  6. Enter ‘sudo echo “[default]” > /etc/nsmb.conf’ (note that you need the double quotes in there)
  7. Enter ‘sudo echo “notify_off=yes” >> /etc/nsmb.conf’ (need double quotes)
  8. Restart your Mac

Mac Windows File Sharing - nsmb.conf

nsmb.conf

Upon restarting your Mac, you will likely find that Windows (Samba) file sharing is much faster!

Use a fully qualified user/domain name when connecting ^

When connecting to a Windows share, consider entering your user name in the DOMAIN\username format rather than just the username. For example, use MYCOMPANY\jsmith instead of jsmith. Similarly, when entering your domain name, use a fully qualified domain name (FQDN) instead of the Pre-Windows 2000 name. For example, use ad.mycompany.local rather than MYCOMPANY. Both will work, but the FQDN is faster.

Mac Windows File Sharing - Use the DOMAINusername format

Use the DOMAIN\username format

Finder settings modifications ^

The Mac version of explorer.exe, aptly named Finder, handles the presentation of network file system objects. It also initiates and maintains connections to network resources, including Windows servers and shares. You can speed up Finder (and thus sharing) by doing the following:

  1. Go to Finder > Preferences > Sidebar
  2. Uncheck “Connected Servers”
  3. Go to Finder > Preferences > General
  4. Check “Connected Servers”

Mac Windows File Sharing - Do not display connected servers in the side bar

Do not display connected servers in the side bar.

The result will be that entire servers no longer display on the sidebar, which frees up network and system resources for just the shares you are interested in accessing. However, you will want to create an alias for the shares you access frequently.

Hard wire your DNS entries ^

This is a rather primitive tip but it works. Some of the OS X difficulties with Windows file sharing have been tied to DNS issues (hence why FQDNs are preferred). You can speed up the process by simply hard coding your interesting FQDN entries in your /etc/hosts file. Doing so will prevent OS X from querying DNS; instead, OS X will respect the entry in your /etc/hosts file. Here’s how you do it:

  1. In Finder, use Go to Folder and navigate to /etc
  2. Using a text editor (TextEdit works fine), open the hosts file and add entries in the proper format for all of the interesting hosts. For example, you would add “server.ad.mycompany.com 10.1.1.10” to map that FQDN to that IP.
  3. Save and close

More Tips ^

For more tips on improving Windows file sharing in Mac OS X check out the MacWindowsTips page. This is by far the most informative and exhaustive set of suggestions related to improving the performance of SMB-based file sharing.

1 Comment
  1. Michael 11 years ago

    Nice article. One aside: I’d avoid using “.local” for an active directory name on a network that has Macs. Unless you’re going to disable Bonjour networking on every Mac.

Leave a reply

Your email address will not be published.

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account