« Jaron Lanier | Main | Mathematical information theory and cybernetics »

October 01, 2007

Setting up filesharing between OSX and FC5

Now, this is somewhat unrelated to this blog, but I'll put it here anyways - mainly because I need to make notes about how I did it...

I need to be able to access and share files between all my computers - some of which are running Linux (FC5) and some which are running OSX. After fiddling around a little bit I decided to go with Samba as it seemed to be the most straight forward and usable solution.

I began by installing Samba and all its dependencies on my FC5 system by running:

$ yum install samba

In FC5 the samba deamons can be started by running:

$ service smb start

and (optionally)

$ service winbind start

To make the deamons are started at boot time run

$ chkconfig smb on

$ chkconfig winbind on

The main configuration is done in /etc/samba/smb.conf and great help for how to configure it can be found in this document. I wanted a singel directory that would work as a shared volume on the local network so I added restrictions to the hosts allow section (setting its value to 192.168.1. 127. will allow connections only from localhost and the 192.168.1. namespace on the network).

I created a shared volume with adding the following to the smb.conf:

[data]
comment = Data
path = /path/to/shared/directory
force user = username
read only = No
guest ok = No
writable = yes
printable = no

Test the config file with:

$ testparm /etc/samba/smb.conf

Add a user to smbpasswd by running:

$ smbpasswd -a user

Now, restart the Samba server and test your configuration:

$ smbclient -L servername

where servername is the address of the server that Samba is running on. If your are issueing the command from the same machine, localhost would be a woring servername. If this works you can try to connect to your service by running

$ smbclient //localhost/data and enter the password you added for the user edited above. In the example, localhost is the server and data is the name of the server as it is defined in the smb.conf.

Now, in OSX use the 'Connect to server...' command and enter: smb://servername/data

as the address. If everything worked out you will now be prompted for your password and onced this is enetered and verified, the volume will appear in the Finder.

Posted by henrikfr at October 1, 2007 10:38 PM

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?

(You may use HTML tags for style)