How to Set Up an SMB Server in OS X and Windows 8
Say you just upgraded from a Windows computer to a shiny new Mac. You're quite excited, and after the euphoria of hearing the start-up sound for the first time has worn off you realize that you're faced with quite a daunting task: "How do I move my files from my Windows computer to my Mac?" You could use a flash drive, but those are slow and have space restrictions. A external hard drive? Sure, but it needs to be formatted as FAT 32, which has size restrictions. But what if I told you that you can move files between computers using just your Internet connection?
Screencast
How to Set Up an SMB Server in OS X and Windows 8
smb://
Just what the heck is a Samba or SMB server anyways? Well, a Server Message Block is just the protocol that defines how information is sent between two computers. Much like the Hyper Text Transfer Protocol, or https://
, it lets the computers send and receive information between each other without conflict. Think of it like a phone call. The protocol that is used to transfer information between the two people speaking on the ends is just the language they are using.
Lets break down what makes up a Samba URL:
A normal Samba URL.
- smb:// This defines the protocol used.
- ian The username for this session.
- secret The password for that user.
- 192.168.1.102 The location that will be contacted.
To put that request in words, you're saying:
Hey, 192.168.1.102. It's ian. My password is: secret. May I have permission to use your server?
If all goes well, the server will respond with:
Hey Ian, it's 192.168.1.102. Sure you can!
Before We Start
There are a couple of things we need to go over before we can start. Think of this as a 'Getting Started Checklist'.
- The two computers must be on the same network.
- It does not matter if the computers are wireless or wired.
- Do not use file sharing on a public network
- Always password protect your files
Now that we've gotten that out of the way, lets get started!
Configuring Your Computers.
Configuring Windows
This tutorial will cover how to set up folder sharing on Windows 8. The process is very similar for Windows 7 and Vista, but may differ for Windows XP and lower.
You will need to apply a password to your user to share files in Windows, if you already have a password set; skip to step 3
- Move your mouse to the top right corner to reveal the charms menu. Select the Settings button and click Change PC settings.
- Select Create Password and choose a new password.
- Move your mouse to the top right corner to reveal the charms menu. Select the Search button.
- Search for 'Computer'
- Right click on Computer and select Properties
- Under 'Computer Name, domain, and workgroup settings' select Change Settings
- Enter an administrator password if you're asked to at the UAC dialog
- Click the 'Change' below 'Network ID'
- Take note of the computer name and choose a workgroup name. This can be anything you like, I chose
ECNEPSNAI
, which is my name backwards - Click OK, then Apply. You will be warned that you need to restart your computer. Save any open documents and restart your computer.
The Computer Name/Domain settings dialog.
Configuring OS X
- Click the Apple menu and select System Preferences
- Select Network to open Network Preferences
- Click the Advanced button in the bottom right
- Go to the WINS tab
- Take note of the NetBIOS name and enter the same workgroup name as your set on your windows computer.
- Click OK, then Apply.
The WINS settings in OS X.
Connecting to OS X on Windows
- Move your mouse to the top right corner to reveal the charms menu. Select the Search button.
- Search for 'Network'
- Click on Network
- Under the Computers section your MacBook will appear with the name you chose when when configuring OS X (the NetBIOS name).
- Double click on your MacBook, you will be asked to enter a username and password. This is the username and password for your MacBook, not the Windows computer.
- Once connected, you can now browse the files on your Mac.
Enter your MacBook Pro login here.
If you don't see your Mac show up in Network, you can try a direct connection:
- Press the Windows Key and tap R. The run dialog box appears
- Type in
\\
followed by the NetBIOS name of your Mac. For example:\\MACBOOKPRO-10CC
. - You can now browse the files of your Mac.
Connecting to Windows on OS X
Once you've gotten everything set up you can connect to the other computer and begin sharing files. Connecting to a server on OS X is easy!
- In Finder, select Go and Connect to Server (Command+K)
- On the Conntect to Server dialog, type in
smb://
followed by the name of the computer you wish to connect to - Click connect. You will be presented to enter a username and password, this is the password for the user on the computer you wish to connect to. Make sure to check "Remembver this password in my keychain"
- You will now be asked which folder to mount. By default, Windows will make the Users folder accessible, so you can mount that.
- You are now connected to that computer through smb! You can access the files through the icon on your desktop or in any finder window.
The Connect to Server dialog in OS X
Automatically Connect on Windows
To have your computer automatically connect to your Mac at startup, you need to Map that drive. It's easy:
- Open Computer in File Explorer
- Bring down the Ribbon by clicking 'Computer' beside File at the top
- Click Map Network Drive
- Expand the shared folders for your Mac. Select a folder and click OK
- Make sure 'Reconnect at sign-in' is checked and click Finish
- Now in My Computer, you can have quick access to your Mac as if it was a hard drive on your computer.
Automatically Connect in OS X
If you Map the drive; Windows will automatically connect to your network drive when you log in, but OS X will not by default. To configure OS X to automatically connect to your network drive at log in:
- Connect to the server if you have not already.
- Open the User Preferences pane in System Preferences.
- Select the Login Items tab.
- Drag the Network Drive icon from your desktop to the Login Items list to add it.
- Check the Hide box so it will connect in the background.
The Login Items settings in System Preferences.
OS X Will now automatically connect and mount that network drive at login.
Configuring Which Folders are Shared
By default, OS X and Windows will grant access to your entire user directory any maybe a few others depending on your OS. If you need to, you share any folder on the list with only a few clicks.
On Windows
- Find the folder you wish to share as a drive, right click it and select Properties
- Go to the Sharing tab and select Advanced Sharing
- Check "Share this folder" and customize the name if you wish
- Click Permissions
- Check Full Control under Allow for Everyone
By default, you can't edit any of the files in this shared folder unless logged in. To change this:
In OS X
- Find the folder you wish to share as a drive, right click it and select Get Info
- Check Shared
Sadly, there isn't a way to hide that black notification bar alerting you that this folder is shared. Sorry!
What's Next?
Now that you have your computers talking to each other, what's next? One of the best things you can do if you use multiple computers is set up a local file server that you can store all of your pictures, movies, music, and documents on so that you don't need to worry about multiple copies. If you're a developer, you can set up a local Git or SVN server to keep track of your progress and roll back if you need to. But most importantly, sharing big files between computers is much easier now. No more need for a Flash Drive or DVDs.