Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

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.

Google Cloud Platform icon

Path Info

Clock icon Beginner
Clock icon 30m
Clock icon Jun 25, 2021

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install Samba, Add a User, Create a Directory, Check selinux Status, and Set File System Context

    1. Install the Samba package.
    2. Start the Samba service.
    3. Enable the Samba Service.
    4. Add the smbuser1 user to the system.
    5. Set the password for user smbuser1.
    6. Create a directory named /smbuser1.
    7. Change the permissions to read, write, execute on /smbuser1.
    8. Check the status of selinux.
    9. If running, set the context of /smbuser1 to samba_share_t.
  2. Challenge

    Edit the Samba Configuration and Add a Share, Test the Configuration, and Restart the Samba Service

    1. Configure a Samba share named /smbuser1 with read and write access for user smbuser1.
    2. Test the configuration file for syntax errors.
    3. Restart the Samba service.
    4. Get the Samba server system IP address.
  3. Challenge

    On the Client Server, Install the CIFS package, Configure a Persistent Mount, and Test the File System

    1. Install the CIFS utilities package.
    2. Create the mount point, /mnt/smbuser1.
    3. Grant read, write, and execute permissions on /smbuser1.
    4. Configure /mnt/smbuser1 to mount persistently on Server2.
    5. Configure a credentials file for mount authentication.
    6. Mount the file system.
    7. Verify the file system is mounted and has read and write access.
    8. Mount -a

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

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.

Start learning by doing today

View Plans