Skip to main content

Sponsors

Connecting to Windows Share Folder using SMBFS in FC6

Posted in

My LANDISK Pro provides windows share folder service, SMB server. However, connecting to the folder using CIFS gives error:

mount error 20 = Not a directory

Old command smbmount suppose to work well with old SMB server. However, smbmount no longer comes with FC6. Hence, you'll need to compile it from source. In order to use smbmount, you'll need the kernel support for SMBFS.

# Check if SMBFS is currently enabled.
$ cat /proc/filesystems

# Enable SMBFS if it is not found.
$ modprobe smbfs

If it can't find the kernel module smbfs.ko, you'll need to look for how to include SMBFS kernel module for your kernel. Typically, I just re-compile the kernel from source with the SMBFS enabled. You may try to find smbfs.ko from somewhere else. However, the kernel version and gcc version used to compile the smbfs.ko should match exactly your own kernel version.

$ yum install fedora-rpmdevtools yum-utils cups-devel
$ rpm -Uvh samba-3.0.23c-2.src.rpm
$ cd /usr/src/redhat/SPECS
$ rpmbuild -bp --target $(uname -m) samba.spec
$ cd /usr/src/redhat/BUILD/samba-3.0.23c/source
$ ./configure --prefix='' --with-fhs --with-smbmount
$ make include/proto.h bin/smbmnt bin/smbmount bin/smbumount
$ cp bin/smbmnt bin/smbmount bin/smbumount /bin

The commands smbmount, smbumount appear in /usr/src/redhat/BUILD/samba-3.0.23c/source/bin. I can now connect to the LANDISK Pro SMB server.

# Mount
$ smbmount //SMBSERVER/SHAREFOLDER MOUNTPOINT -o fmask=600,dmask=700

# Unmount
$ smbumount MOUNTPOINT

See the details in SMBFS support for Fedora Core 5 Linux aka FC5

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.