Monday, May 9, 2011

Samba setup in Ubuntu 10.04

Things I wanted to accomplish:
- Share files on internal Harddrives
- Share files on external USB Harddrives that are frequently disconnected

I tried NFS first, but for whatever reason, it was slow and frequently caused the PCs to freeze if shares were not unmounted prior to being disconnected. Samba has been much more forgiving.

Folder sharing
To share a folder, right-click on it and select Sharing Options. If you're not setup for sharing, it will prompt you to install some packages. Change the share name if it complains that it already exists.

External USB Harddrive sharing
Instead of sharing the actual harddrive, I created a symbolic link in my home folder to /media for USB harddrives that were frequently disconnected.

Samba is not setup to follow symbolic links by default, so this must be enabled. Add to /etc/samba/smb.conf in [global] section:
follow symlinks = yes
wide links = yes
unix extensions = no

Restart samba via the terminal:
$ sudo restart smbd
Quirks
  • Using shares-admin doesn't show shared folders...
  • Looking at smb.conf doesn't show shared folders...
  • Sometimes folders don't show as being shared in nautilus, but they are...

No comments:

Post a Comment