In UNIX systems, the Samba is shared file and print services package between computers in your network through server message block protocol (SMB). SMB (Server Message Block) protocol is a client-server protocol, and on the application, is a standardized protocol shared Windows file and print services. You can share files or printers between two computers.

Samba is an open source software, any organizations with GNU General Public License GPL can be used, and free access to its source code and the executable file.

Installing Samba

Yum install samba

Configuring Samba

Samba configuration is to mainly edit the/etc/Samba/SMB.conf file. There are four main Samba
configuration:

1、global

Mainly used to set global environment variables

2、homes

To configure per-user access to the/home/user directory

3、printers

Configure printer sharing, not commonly used

4、public

Configure a shared folder

path = /Documents
writable = yes
valid user = username
Share the/Documents folder, where username can access the folder, permissions to writable

Firewall configuration
1.iptables firewall

2.SELinux

If you implement shared homes needed commands:

setsebool -P samba_enable_home_dirs on

If the shared folders need to be ordered:

Chcon-t samba_share_t shared directory

5, User configuration

Access to Samba file sharing users must already have for the system user, and set a password for Samba
file sharing:

Smbpasswd-a user name

6, checking Samba status

smbstatus

Leave a Reply

Your email address will not be published. Required fields are marked *