Continue reading for the HOWTO, and a gotch-ya to be aware of when dealing with symbolic links ...
(root@bermuda)~> /sbin/mount.cifs //192.168.1.100/mark /mnt -o user=mark
This command should complete successfully if the Samba server at 192.168.1.100 is configured correctly. If it dosen't, and you see an error on the console from the mount.cifs command, check the system log for more information by running "dmesg". Once mounted, you can check the mount-point details using the df command:
(root@bermuda)~> df -h /mnt
Filesystem Size Used Avail Use% Mounted on
//192.168.1.100/mark 30G 8.4G 21G 30% /mnt
The -h flag tells df to display the mount-point data in a human-readable format. For more details, see the man 1 df.
(root@bermuda)~> ll /mnt
total 372
lrwxrwxrwx 1 mark mark 5 2008-04-11 01:08 core -> /core
drwxr-xr-x 2 mark mark 0 2008-11-19 10:16 Desktop
Neat, it worked! But there's just one small problem: core is a symbolic link to /core on 192.168.1.100. I wanted this to resolve to a directory, not another symbolic link. If I try to change directories to /mnt/core, it won't work:
(root@bermuda)~> cd /mnt/core
bash: cd: /mnt/core: No such file or directory
This is happening because /core isn't a mount point on my localhost, /core is a mount-point on 192.168.1.100, our Samba share. The trick is to set /proc/fs/cifs/LinuxExtensionsEnabled to 0 (zero):
(root@bermuda)~> umount /mnt
(root@bermuda)~> echo "0" > /proc/fs/cifs/LinuxExtensionsEnabled
(root@bermuda)~> /sbin/mount.cifs //192.168.1.100/mark /mnt -o user=mark
Now, let's check /mnt. We should be able to navigate into /mnt/core with no issues thanks to echo "0" > /proc/fs/cifs/LinuxExtensionsEnabled.
(root@bermuda)~> ll /mnt
total 376
drwxrwxrwx 1 root root 0 2008-12-12 14:52 core
drwxrwxrwx 1 root root 0 2008-11-19 10:16 Desktop
(root@bermuda)~> cd /mnt/core
(root@bermuda)/mnt/core> ll | grep -i vms
drwxrwxrwx 1 root root 0 2008-11-18 23:17 vms
Awesome! Now I can navigate into /mnt/core and access files in /core on the Samba server via the symbolic link in the home directory.


Did you find this post helpful, or at least, interesting?