Samba is a client/server system that implements network resource sharing for Linux and other UNIX computers. With Samba, UNIX files and printers can be shared with Windows clients and vice versa.
Samba supports the Session Message Block (SMB) protocol. Nearly all Windows computers include SMB support with their internal network subsystems (NetBIOS in particular).
With an appropriately-configured Samba server on Linux, Windows clients can map drives to the Linux filesystems.
Likewise, the Samba client on UNIX can connect to Windows
shares by their UNC name. Although differences among various operating
systems (such as filesystem naming conventions, end-of-line conventions,
and authentication) can limit interoperability, Samba offers a generally serviceable mechanism for resource sharing on a heterogenous network.
Install Samba on CentOS 6.0/6.1/6.2/6.3/6.4/6.5
To install the samba package,enter the following command:
Check the version of installed samba software by using this command:
Check Samba version
Configure the samba service, so that, it will start automatically at boot time:
Add these Iptables rules, so that samba will work perfectly:
Backup the smb.conf file, then delete it and create the new one:
Add these lines, in your smb.conf file (or change it according to your requirement):
#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
security = share
map to guest = bad user
#============================ Share Definitions ==============================
[MyShare]
path = /home/samba/share
browsable =yes
writable = yes
guest ok = yes
read only = no
Save the smb.conf file and restart the service:
Change permission for samba share:
Access the samba share from windows (where 192.168.1.15 ip address of my samba server):
Access to Samba share
Successfully access to Samba share
Add and manage Samba users and groups
Add a group in your CentOS server:[Secure]
path = /home/samba/secure
valid users = @smbgrp
guest ok = no
writable = yes
browsable = yes
Create new samba share
0 comments:
Post a Comment