In addition to its core component, Samba comes with a bunch ofpretty powerful ancillary utilities: an SMB client, an SMB filesystemmounter, a backup tool, and a Web-based administration utility. Find outhow you can use them, inside.
Thus far, you've been sharing directories on the server with Windows clients through Samba. But here's a twist - what if you want to mount a shared directory on another workstation on the server?
Samba allows you to do this via its very cool "smbmount" utility. Let's assume that there exists a Windows machine on the network named "clubhouse", and it exposes a share named "music". In order to mount this share on my Linux server ("olympus"), I'd first need to create a mount point
$ mkdir /mnt/music
and then use the "mount" command (which internally calls "smbmount") to mount the share using standard SMB syntax.
$ mount -t smbfs //clubhouse/music /mnt/music
Once the share has been mounted on the Linux server, I can manipulate it using standard Linux filesystem commands:
$ ls -l /mnt/music
$ tar -czvf /tmp/archive.tgz /mnt/music/*
Let's take it one step further. I can now share this mounted directory as a Samba share on the Linux server, so that other connecting clients can see it as well. Here's the addition to the "smb.conf" file:
[music]
comment = Music path = /mnt/music public = yeswriteable = no
Connecting clients will now be able to see the "music" directory on machine "clubhouse" as a share named "music" on the "olympus" Samba server.
This is a roundabout way of doing things, but it's an interesting experiment nevertheless, and it serves to demonstrate how easy Samba makes it to create links between different systems and machines.
You can unmount mounted SMB filesystems with the "smbumount" command, in the usual manner: