Install and Configure SAMBA Server

Install and Configure SAMBA Server.

Prerequisites:

> CentOS 6 / RHEL 6 installed on server.
> YUM server configured in Network / Operating system
> Make sure selinux is disabled.

Steps to install SAMBA server:

> Install samba packages.
Command: #yum -y install samba* 

> Update samba server if required.
Command: #yum update samba*

> Start samba service 
 Command: #service smb restart



> Edit smb.conf file and put the following information. and delete other contains of the file.
Command: #cd /etc/samba/                        ----- Go to samba directory
                    #vi smb.conf                            ----- Edit smb.conf file


hosts allow = This option is allowing only those network range which are specify in smb.conf file.
Above scrnneshot valid networks are 127, 198.19.99 and 172.30.0 only.

path = < Share directory name >
This option is use to provide details of directory which is available from windows machines.

> Start samba service in boot process.
Command: #chkconfig smb on

>  Restart samba service.
Command: #service smb restart

> Give the full ( Read and Write ) access to share directory.
Command: #chmod -R 777 /ISO-Share

Note: ISO-Share is my linux directory which I am using for windows share.



> Start service winbind
Command: #service winbind start

> Start winbind service in boot process
Commnad: #chkconfig winbind on

>  Enable Firewall for samba service

Command: #iptables -A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
                    #iptables -A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
                    #iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
                    #iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT

Note: If IPTABLES are already disabledin linux than don't use the above commands.

> Restart iptables service.
Command: #service iptables restart

Access SAMBA server from Windows client machine. 

> In Windows machine type samba server IP in RUN window. and click OK button.

 

> Following windows will be open.



> Double click to shared folder and you will be able to access linux files from share folder.








 EOF


Comments

Popular posts from this blog

KVM Live Migration without Shared Storage

Create CentOS 6 Local package and Group package Repository

Create Linux ( LUCI ) Cluster