Easy file sharing with Mac OS X Mavericks and Linux
This whole dilemma started when I got a Macbook pro for as a gift. Being and open source enthusiast, my primary system and obvious OS of choice is a Linux laptop.
After having some time fiddling around OS X, I needed to transfer couple of files every now and then from my Linux box to the OSX without having to need another storage device.
Hello my friend google.
Not so good nor easy tutorial to follow. Most were related to afp.
And then it hit me. MacOS is just unix underneath. Samba! If I could get windows shares working over Samba, it could work on OS X too.
After few tweaks, here is what I found.
Linux Box.
You need to install Samba server.
And one minor edit on the config file.
Add Samba users.
Lets start!
We’re going to be editing a few files later on. I like to use Linux’s included gedit to edit files. Others may prefer, to use Nano, Vi, Vim, etc..
Step 1: Installing Samba server
Since I’m using Linuxmint as my linux distro which is based on Ubuntu I’m gonna install Samba like this.
sudo apt-get install samba
Once that is done, we need to edit a minor change in /etc/samba/smb.conf
Step 2: Editing samba config file.
Another command in the terminal shell.
sudo gedit /etc/samba/smb.conf
Using gedit search for the line “security” till you land on this piece of code.
# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
# security = user
See the last line there which says “#security = user”
Uncomment it by removing the # in front of it.
Save the file.
Exit gedit.
Moving along.
Step 3: Adding Samba users.
Next command in the terminal shell.
sudo smbpassword -a username
You’ll be asked to type in your password twice.
The hard part is over now.
Right click a folder click “Sharing options”
And tick the options as shown in the screen shot.
All done for the linux configuration.
Lets move on to OS X.
Step 1: Open finder. Click “Go” on the menu and click “Connect to Server” shortcut Command+K