- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Configure a Samba Server and Client and Mount a File System on Linux
NFS and Samba are both used commonly as file-sharing solutions between Linux servers. In this lab, you'll learn to configure a Samba server and a file share. You'll then create a Samba user. Next, you'll configure a Samba client and mount the file system from the server to the client.

Lab Info
Table of Contents
-
Challenge
Install Samba, Add a User, Create a Directory, Check selinux Status, and Set File System Context
- Install the Samba package.
- Start the Samba service.
- Enable the Samba Service.
- Add the
smbuser1
user to the system. - Set the password for user
smbuser1
. - Create a directory named
/smbuser1
. - Change the permissions to read, write, execute on
/smbuser1
. - Check the status of
selinux
. - If running, set the context of
/smbuser1
tosamba_share_t
.
-
Challenge
Edit the Samba Configuration and Add a Share, Test the Configuration, and Restart the Samba Service
- Configure a Samba share named
/smbuser1
with read and write access for usersmbuser1
. - Test the configuration file for syntax errors.
- Restart the Samba service.
- Get the Samba server system IP address.
- Configure a Samba share named
-
Challenge
On the Client Server, Install the CIFS package, Configure a Persistent Mount, and Test the File System
- Install the CIFS utilities package.
- Create the mount point,
/mnt/smbuser1
. - Grant read, write, and execute permissions on
/smbuser1
. - Configure
/mnt/smbuser1
to mount persistently onServer2
. - Configure a credentials file for mount authentication.
- Mount the file system.
- Verify the file system is mounted and has read and write access.
- Mount -a
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.