Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Tutorials»How to Create Network Share via Samba on Linux

    How to Create Network Share via Samba on Linux

    RahulBy RahulJanuary 15, 20142 Mins ReadUpdated:January 6, 2018

    Samba is an SMB/CIFS networking protocol is used for providing file and print services for Microsoft clients. Samba also can be used as part of Active Directory domain. Samba uses TCP/IP protocol for communication.
    I am using CentOS 6.3 for below installation instructions, But below steps will also work on CentOS 5 as well.

    Step 1 – Install Samba

    sudo yum install samba       ## CentOS and Redhat systems 
    sudo dnf install samba       ## Fedora 22+ systems 
    sudo apt install samba       ## Debian based systems 
    

    Step 2 – Create Account for Authentication

    Now create a system account for authentication to access samba shares.

    useradd marc
    passwd marc
    

    Also add this account in smbpasswd file to be used by samba authentication.

    smbpasswd -a marc
    

    Step 3 – Configure Share Directory

    Now you will required a directory to be access with samba.

    mkdir /opt/shared
    

    Add below entry in Samba configuration file /etc/samba/smb.conf at the bottom.

    [shared]
    comment = Public Stuff
    path = /opt/shared
    public = yes
    writable = yes
    valid users = marc
    write list = marc
    

    Step 4 – Restart Samba Service

    Restart smb and nmb services of your system.

    systemctl restart smbd.service
    systemctl restart nmbd.service
    

    Step 5 – Access Samba Share

    To test your setup, you need to access shared location from windows system. Open run window on your Windows operating system and type below.

    //192.168.1.90/publicshare/
    

    Change IP with your samba server IP address. If will prompt for authentication. To authorize use account created in
    step 2.

    nmb samba smb smb.conf smbpasswd
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleInstall PartKeepr ( Inventory Manage System ) in CentOS & RHEL
    Next Article How to Install MariaDB 5.5 in CentOS, RHEL 7/6 using Yum

    Related Posts

    (Resolved) userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms

    Updated:May 10, 20221 Min Read

    How to Install Apache ActiveMQ on Ubuntu 22.04

    3 Mins Read

    How To Enable SSH Server on Ubuntu 22.04

    Updated:April 22, 20222 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    10 Best Linux Video Players in 2022

    Updated:February 18, 20226 Mins Read

    How to Switch Python Version in Ubuntu & Debian

    Updated:April 22, 20223 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.