Before you start
Learn what these tutorials can teach you and how you can get the most from them.
The Linux Professional Institute (LPI) certifies Linux system administrators at junior and intermediate levels. To attain each level of certification, you must pass two LPI exams.
Each exam covers several topics, and each topic has a weight. The weights indicate the relative importance of each topic. Very roughly, expect more questions on the exam for topics with higher weight. The topics and their weights for LPI exam 201 are:
- Topic 201
- Linux kernel (weight 5).
- Topic 202
- System startup (weight 5).
- Topic 203
- Filesystems (weight 10).
- Topic 204
- Hardware (weight 8).
- Topic 209
- File and service sharing (weight 8). The focus of this tutorial.
- Topic 211
- System maintenance (weight 4).
- Topic 213
- System customization and automation (weight 3).
- Topic 214
- Troubleshooting (weight 6).
The Linux Professional Institute does not endorse any third-party exam preparation material or techniques in particular. For details, please contact info@lpi.org.
Welcome to "File and service sharing," the fifth of eight tutorials designed to prepare you for LPI exam 201. In this tutorial, you learn how to use a Linux system as a networked file server using any of several protocols supported by Linux.
The tutorial is organized according to the LPI objectives for this topic, as follows:
- 2.209.1 Configuring a Samba server (weight 5)
- You will be able to set up a Samba server for various clients. This objective includes setting up a login script for Samba clients and setting up an nmbd WINS server. Also included is changing the workgroup in which a server participates, defining a shared directory in smb.conf, defining a shared printer in smb.conf, using nmblookup to test WINS server functionality, and using the smbmount command to mount an SMB share on a Linux client.
- 2.209.2 Configuring an NFS server (weight 3)
- You will be able to create an exports file and specify filesystems to be exported. This objective includes editing exports file entries to restrict access to certain hosts, subnets, or netgroups. Also included is specifying mount options in the exports file, configuring user ID mapping, mounting an NFS filesystem on a client, and using mount options to specify soft or hard and background retries, signal handling, locking, and block size. You should also be able to configure tcpwrappers to further secure NFS.
The current LPI exam objectives for topic 209 exam cover NFS and Samba. But if you are a system administrator designing a server configuration, you should also consider whether FTP, SCP/SSH, HTTP, or other protocols might, in fact, meet your requirements.
One of the most significant uses for Linux, particularly in a server context, is to provide shared files to client systems. In fact, in a general way, serving files is probably most of what all networking is used for. This tutorial -- and in fact, this series of tutorials -- will not address peer-to-peer file-sharing servers such as BitTorrent. Rather, this tutorial looks only at older client-server arrangements: A central server that provides disk stores for multiple clients. Even when clients upload files, those are always stored and served by the server, rather than in a decentralized fashion.
Protocols widely used for file serving include HTTP (the WWW), TFTP (Trivial File Transfer Protocol), FTP (File Transfer Protocol), SCP (Secure Copy Protocol, a specialized use of SSH), RCP (Remote Copy Protocol, generally deprecated), NFS (Network File System), and Samba (server message block). HTTP and SSH will be discussed in upcoming tutorials for LPI exam 202, as will security issues around FTP. TFTP and RCP are special purpose or deprecated and will not be addressed in these tutorials.
This tutorial looks at NFS and Samba in some detail and briefly describes FTP. NFS and Samba are network file-sharing protocols that allow mostly transparent access to remote filesystems. FTP might require a custom FTP client program, although many desktop environments or tools (on Linux or otherwise) hide the details of this negotiation and effectively present the same user interface as an NFS- or Samba-mounted drive.
To get the most from this tutorial, you should already have a basic knowledge of Linux and a working Linux system on which you can practice the commands covered in this tutorial.




