How to Configuring – SAMBA SERVER in RHEL 6



Server is a computer which give services to other user or client computer .The capability or physical structure of a server depends on the number of client or user computer it gives service. We can set up or configure a server in a home computer or PC if I have 5 or 6 client computer. But if we have 100 or 1000 client computer then we have to configure the server in a computer which has more processing power, more ram, more storage capability   and redundant power supply. Now SAMBA server is a server which gives services to the windows operating client computer (like windows 7 or windows 8 and XP) but configured in LINUX operating system. Samba server generally is a file sharing server or file server. User can access the server, read or write any file, folder, resources according to permission.

 Today we will see how we can configure Samba server in a RED HAT ENTERPRISE LINUX 6 operating system. But before starting, you have to configure ‘YUM’ procedure in your Linux operated server computer and your computer needs a statically assigned IPv4 or IPv6 address.

#log in to your computer using ‘root’ administrator.

# yum install □samba-*      

# mkdir □/backup

# yum install □samba-*      

# mkdir □/backup

# cp □ /etc/samba/smb.conf

In this 3 steps we install samba related all packages (* means all), made a directory ‘backup’ on home location and backup or copy the ‘smb.conf ‘File into the ‘/backup’ folder. Because we have to edit the ‘smb.conf’ file and if anything wrong happened we can restore it from the backup folder.

# vi □ /etc/samba/smb.conf

In this step we opened ‘smb.conf ‘ file throw VIM editor for editing some line or configuration on the file .we can use ‘ :set number ’ to give number of each line .but you have to give the command after opening the file. In below figure we will what have to edit.  





# mkdir □/home/myshare

# chmod  □ -R□ 777□ /home/myshare

In thisep we make a folder or directory name ‘myshare’ in home location which we already assigned as a share file before in ‘smb.conf’ file. We also assign full permeation to the folder by ‘777’.

# adduser  □imran

#passwd  □imran

>new password □ anything

>retype password  □anything

In this step we make user account and set password for user. Here ‘imran’ is the name of user account.

# smbpasswd  □ –a □  imran

>New password □  anything

>Retype password □  anything

In this stapes we include the user into samba server and give him a password to access


#service □nmb□ restart

#service □ smb □ restart

We restart the service of samba here

#vi □ /etc/fstab

We have to edit this file in different line which is shown below: –


Now we have to go to a windows client PC and do like below:


Then we have to give user name and password.


1) □ this symbol means space.

2) When giving new password to user it will not show in the black screen or Linux window.

3) IP address of the user PC and server PC must be same block.

If any problem happen configuring server please leave comment.


About Author


1 Comment

Leave A Reply