Configure a Samba Server and Client and Mount a File System on Linux

Configure a Samba Server and Client and Mount a File System on Linux

  • Last updated 6/2024
  • English
  • Published 2025-04-24
  • Location Online
  • Duration 30m
What you'll learn

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.

This course includes:

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