Moon Light Box

Time is Money

Linux - Install Samba in CentOS 7

| Comments

Step 1. Install Package.

# sudo yum install -y samba samba-client

Step 2. Create Shared Folder.

# cd /opt
# sudo mkdir /opt/shared_folder
# sudo chmod 2770 -R sharedfolder/
# sudo chown -R root:shared_user shared_folder/
# sudo groupadd shared_user

Step 3. Modify smb.conf.

# sudo vim /etc/samba/smb.conf

[homes]
        comment = Home Directories
        browseable = no
        writable = yes
;       valid users = %S
;       valid users = MYDOMAIN\%S

;[printers]
;       comment = All Printers
;       path = /var/spool/samba
;       browseable = no
;       guest ok = no
;       writable = no
;       printable = yes

[SHARED]
        comment = SHARED FOLDER
        path = /opt/shared_user  // your folder path
        browseable = yes
        writable = yes
        write list = @shared_user  // folder owner group
        read only = no
        directory mask = 0775
;        create mask = 0644

Step 4. Set Firewall Policy.

# sudo firewall-cmd –permanent –zone=public –add-service=samba
# sudo firewall-cmd –reload

Step 5. Auto Start when Boot On.

# sudo systemctl status smb
# sudo systemctl start smb
# sudo systemctl enable smb

Notice

If you want to use AD, please see this topic AD.

Linux

Comments

comments powered by Disqus