Saturday, December 24, 2011

Samba on Linux

Non-computer geeks might want to skip this one.

Samba allows you to access Linux file systems from Windows networks--very useful if you have a mixed collection of PCs around the house, as I do.  I have installed Samba on previous Ubuntu Linux versions, and after a certain amount of struggle, usually managed to get it working after a small amount of editing the smb.conf file and exasperation.

Something that has been added recently to the available Linux packages is system-config-samba, a GUI that significantly eases configuring the smb.conf file.  It appears that you still need to restart the smb daemon from the shell after you use the GUI: sudo restart smbd.  Nonetheless, the GUI is certainly easier than trying to get all the magic incantations in the smb.conf file.

One thing that I wanted to do was to have Windows network access to the Windows file system that is on the same hard disk as the Linux box.  (This is a dual boot system.)  I thought that I would just set up a symbolic link from my home directory to the Windows file system (which is located under /media), but it turns out that Samba does not seem to like symbolic links, and I can't make a hard link from the home directory to the Windows file system.  Instead, you have to add the Windows file system to the Samba list.

2 comments:

  1. I knew that the samba-restart had to be done to use any new settings.

    I didn't know that some distros shipped a GUI samba-config tool. Thanks for the heads-up!

    ReplyDelete
  2. Apparently they changed the default behaviour after someone brought a rather trivial exploit to their attention. Samba will still follow symlinks by default, but they have to be to directories that are already shared in some other manner. However, if one sets the 'wide links' option back to the previous default of yes, as the link describes, you can use symlinks in the same way as before.

    ReplyDelete