This article describes how to map (mount) a remote Windows (or Samba) share on a server, to a directory on the local FreeBSD Unix client. See Related Links at the end for mapping to network shares from other types of client.
Prerequisites
This uses the Unix mount_smbfs command. It is not necessary to have Samba installed on the client which will be mapping to the remote share.
However the user may wish to be familiar with Samba on Unix and with the general concept of mapping network shares, such as using UNC paths.
Mapping the drives
The following example uses a file server - Server1 with a share (shared directory) called Files. The workstation (client) is running Unix and will map (or mount) the networked share to a local diretory.
Note that the server can be Unix or Windows as the principle of mounting these shares is the same for both. The action all happens at the client end and really consists of only a couple of steps.
Firstly create a directory on the client where the share will be mounted to - in Unix this is commonly known as a mount point. This directory can be anywhere in the file system, but traditionally is created in the local /mnt directory..
mkdir /mnt/music
The user must have a username and password account on the file server, which is required to access the share.
Run the following command from the Unix workstation..
mount_smbfs -I 10.0.0.2 //andym@server1/files /mnt/music
Where..
- -I 10.0.0.2 is the IP Address of the file server
- //andym@server1/files is the username@servername/sharename
- /mnt/music is the local mount point on the workstation
After being prompted for a password, the contents of the /files share should be available in /mnt/music/files
To unmount the share, type the following command..
umount /mnt/music
If the workstation is mapping to the server through a firewall, port 139 may need to be opened / forwarded.
Related Links
Although the principles are the same for other client operating systems, the commands may differ slightly..
Mapping shares from a Red Hat Linux client
Mapping shares from a Fedora client
Mapping shares from a Ubuntu client
- A.
This comment form is powered by GentleSource Comment Script. It can be included in PHP or HTML files and allows visitors to leave comments on the website.