[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Thursday, 14 June 2001 | Author: Josh Boudreau |
Published to: learn_articles_firststep/General | Page: 1/2 - [Printable] |
Getting Started With Networking for Linux Part 3; Sharing File Systems
Josh Boudreau returns to Linux.com Learn with the third part of his popular introduction to networking series. In part three of Getting Started with Networking for Linux Josh takes a look at sharing file systems between Windows and Linux boxen on the same network, using technologies like Samba and
smbmount . |
Page 1 of 2 >> | |
IntroductionWelcome to the third installment of the Getting Started With Networking for Linux series. In the previous articles we covered networking hardware, basic TCP/IP configuration and how to implement DNS (Domain Name System) for your network. While this article doesn't necessarily require knowledge of the previous topics, it would be a good idea to read the other articles first if you are new to networking in general. Today we're going to see how you can share and mount remote file systems across your network using NFS (Network File System). We will also see how to use Samba to make sharing and accessing Microsoft Window file systems a possibility. If you haven't experimented with this type of service before you will find that having access to the data of all the computers on a network from one single computer is a very handy service. The idea behind this service is that when a file system is shared on a network, any computer with the correct permissions can mount that file system locally and read/write data from it just like you manage data on your local hard drive. In the Unix world the NFS service is used to export and mount file systems. NFS is a standard Unix service and chances are it's already installed on your machine. Microsoft Windows machines don't use the NFS service and instead they export file systems using the SMB protocol that is common among Microsoft Window machines. To export and mount Microsoft Windows shares we are going to use Samba, which is an open source software package that allows Linux to use the SMB protocol. Samba may or may not be installed by default on your Linux distribution but in any case you can get the software from www.samba.com.
Exporting File Systems With NFS
The NFS configuration file used to export file system directories to
other computers is the
As you can see, there are numerous ways to export directories to all or only a few computers. The first column lists the directories that you want to export. The second column lists the hosts that have access to that directory and the permissions they get granted. You can list hosts with IP addresses, DNS domains with wild cards, IP subnets and hostnames.
The last entry in our example file is a special one. It exports the
One thing to note is that DNS wild cards don't match the dots in domain
names. This means that having
Once you have tailored your
Mounting Remote NFS File Systems
Now that we have our directories exported let's see how to mount them
from another machine. The process of mounting NFS file systems is almost
the same as mounting local hard drives or cdroms. You must first have a
mount point to access the file system once it's mounted. A common place
to put mount points is in the
Typing the above commands would create three directories in
Instead of telling mount to use a local device like we usually do when
mounting hard drives or cdroms, we put a hostname or IP address followed
by a colon and the exported directory on the target computer. After
mounting those three directories you can read and write data to them
like normal directories on your local file system. If you try to mount a
directory on which you have no permissions you will get a
| |
Page 1 of 2 >> |