After the Circus

Random Sample
Seagull in Flight

contact me
jean at geemoo dot ca

Jan 17, 2007
Setting up some samba shares on my desktop and have encountered a couple oddities that I thought I would share.

Oddity #1 - Samba and Umounting: I've got my share setup in my /etc/fstab with the user,noauto options, which makes it not mount on bootup and instead lets me mount it as user when I desire. All is good... I type
# mount remove/dev
and joy occurs. I copy my files, do my stuff and then
# umount remove/dev
to umount the directory again. Oh oh. I get the error
umount: only root can unmount //somemachine/somedir from /somepath/somemountpount
. The oddity results in the fact that mount doesn't actually mount the share, but just silently passes the call onto smbmount. The trouble is, umount doesn't do the same and pass the call onto smbumount. So.. to umount your smb share, just call
# smbumount somemount
and all is good.

Oddity #2 - Samba and Symbolic Links: My smb server is a linux server that has smbd running with some shares defined. One of them is my home directory, in which I have a couple soft links (a la ln -s). When I access the share from a windows machine, I can access the link as if it was a regular file or directory. When I access the share from a linux machine, I get
bash: cd: share: No such file or directory
. The result of this is smbd is both smarter than windows, and smarter than me. When you access the samba share from windows, smbd says "you are windows, you don't know what a symbolic link is, so I'm not even going to try to explain it. I'll just tell you that it's a normal file or directory". So the link works as expected. But, when you access it from a linux machine, smbd says "you are linux. You actually know what a symbolic links is, so I'll show you the real thing." Unfortunately, the link target likely doesn't exist on your machine, hence you get a file not found error. You can remedy this by adding
unix extensions = no
to your smb.conf, which will make smbd treat linux and windows clients alike, and mask things like links and other assorted unixousities.
Tags: howto, linux, samba, ottawa, winter, ducks, hdr