Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running two servers and wish to mount a directory on one from the other. For various reasons, I wish to use Samba (smbfs) rather than NFS.

ServerA mounts ServerB with this in the fstab:

//ServerB/sambashare /mount/point smbfs username=blah,password=blah,ro

This works, and I can see the contents of sambashare in /mount/point. However, a symlink in that directory which, on Server A, points at /tmp/blah is not resolving correctly. If I try to go into the directory, it says Permission denied.

The Samba server on ServerB has the following global settings:

follow symlinks = yes
wide links = yes

Any suggestions on why this may not be working? The link does resolve correctly locally on ServerB.

(The names of servers, shares, etc. have been changed to protect the innocent.)

share|improve this question
What version of Samba are you running on ServerB? And what distro/kernel version are you running on ServerA? – 3dinfluence Apr 5 '11 at 19:02

smbfs is the old kernel smb implementation which is no longer actively supported. It's been replaced with the cifs kernel module instead. So try mounting it with type cifs instead of smbfs.

Also make sure that you do not have "Unix Extensions = No" in your smb.conf as this will also disable the kernel modules ability to follow symbolic links. This value defaults to yes so if it's not in your smb.conf you should be all set here.

You may also want to store your credentials in a safer spot as anyone can read /etc/fstab.

To do this do the following as root.

cd /etc/samba/
echo username=mywindowsusername > .smbpasswd
echo password=mywindowspassword >> .smbpasswd
chmod 600 .smbpasswd

Substitute your Windows username and password in the commands. No one else except root would be able to read the contents of this file.

Then modify the line in the /etc/fstab file to look like this:

//servername/sharename /mountdirectory cifs credentials=/etc/samba/.smbpasswd 0 0

share|improve this answer
Thanks for both suggestions. Have moved to cifs but I still get the same problem. unix extension are enabled. – Peter Howe Apr 5 '11 at 15:23
I would have a look at the output of testparm -v to verify what parameters are being set on the share in question. Are there any clues in /var/log/samba/log.smbd? – 3dinfluence Apr 5 '11 at 15:28
Note that unix extensions and wide links are mutually incompatible. Enabling one will disable the other, so do verify your configuration. As you're using a Linux client, you almost certainly want to have wide links disabled and unix extensions enabled. – janneb Oct 9 '12 at 8:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.