Configure Samba Server on CentOS 6.X / RHEL 6.X

Site Admin
Posts: 18
Joined: Sat Jun 01, 2013 12:37 am

Configure Samba Server on CentOS 6.X / RHEL 6.X

Postby HR-SiteAdmin » Tue Oct 08, 2013 9:30 am

Installation Steps :

[b]Step:1 Install the Samba Package using yum[/b]

First Check whether samba package is installed or not using below command:

Code: Select all

[root@site1 ~]# rpm -qa | grep samba
[root@site1 ~]# yum list installed | grep samba

If Samba server is not installed , then use below command to install.

Code: Select all

[root@site1 ~]#  yum install samba  -y

Step:2 Create a folder to be shared by Samba Server.

In my sceanrio i have created a folder /mnt/smb-share ,

Code: Select all

[root@site1 ~]# mkdir /mnt/smb-share
[root@site1 ~]# chmod 777 /mnt/smb-share/

Step:3 Now create a user , which will be allowed to access the share.

Create a user using useradd command and then assgin password using smbpasswd command , this user will be allowed to access the share from the clients like Windows & Linux.

[root@site1 ~]# useradd nextstep
[root@site1 ~]# smbpasswd -a nextstep
New SMB password:
Retype new SMB password:
Added user nextstep.

Step:4 Edit the Samba Server Configuration file (/etc/samba/smb.conf)

Add the below lines at the end of file

Code: Select all

comment = Samba Share
path = /mnt/smb-share/
writable = yes
valid users = nextstep

We can also Change the default workgroup and controll the access of samba share on the basis ip by editing the config file as shown below.

Code: Select all

workgroup = MYGROUP
hosts allow = 127. 192.168.1. 192.168.2.

Save the change and quit the file

Step:5 Now Start the Samba Service & enable the service after reboot.

Code: Select all

[root@site1 ~]# /etc/init.d/smb start
Starting SMB services:                                     [  OK  ]
[root@site1 ~]# chkconfig smb on
Samba-Server-Setup.jpg (23.41 KiB) Viewed 1935 times

Return to “Hostripples dedicated Servers (Linux/Windows)”

Who is online

Users browsing this forum: No registered users and 1 guest