- Lab
- A Cloud Guru
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.
Path 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
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.