In this Post, I will describe how to install samba server in RHEL 5. Samba Server is basically used for file sharing services.
In this article, We will install the Samba Server using "YUM" utility. All the required packages are installed using YUM.
Step by Step installation method of SAMBA Server:
1. In the first step, we will install the required packages or rpm for SAMBA server creation. As describe already for this I will use YUM utility.
#yum install samba*
Using above command all the required packages has been installed successfully.
2. Now start the service of samba on the server operating system.
#service smb restart
#chkconfig
smb on
Once you start the SAMBA service, you must permanent this services otherwise once you take a restart of your machine the service get disabled.
3. In this step , please create a folder which you want to share through
samba.
#mkdir /backup
In my case I have created the "/backup" folder for SAMBA sharing.
4. Now, we will provide the full permission to samba folder to everyone have read/write access for this shared folder.
#chmod
-R 777 /backup
Permission for the samba folder depends upon your requirment.
5. In this step, go to the configuration file of samba and edit the below configuration lines which is mandatory during SAMBA server installation.
#vi
/etc/samba/smb.conf
"Changes all below in configuration file
Work group = SAMBA
Server string = This is my samba server
Uncomment
this line ;netbios name= DNS
server
Passwd backend= smb passwd
[backup]
path=/backup
browseable = yes
writable = yes
valid users = vibhor
guest ok = yes
Save the file"
If you see the above entry, the shared samba path is browseable and writeable for only valid user "vibhor". If you want provide access more user then you need to add user name in this entry.
6. Now to check the entry in samba is correct or not which
I was made in smb.conf file, please run the below command for verification.
#testparm
7. Now add a user which you want to give a access
of samba folder.
#useradd
vibhor
#passwd
vibhor
You can replace the user name according to your client requirement.
8. After final configuration is done , now you need to restart the samba services on the server, So that configuration is made permanent.
#/etc/init.d/smb restart
8. In the final step, if you want to login on SAMBA server on same operating system you need to use below command for login.
#smbpasswd
-a vibhor
It is asking the password , once you enter the Samba user password it is login on the server. And if you want to access the samba server from another Linux machine please use the below command/synatx for login.
#smbclient
//192.168.1.12/backup -U vibhor
smb>exit
So, using above step by step method you can installed and configured the SAMBA server on Red hat operating system. I would request to you please let me know if you facing any issue while creating the SAMBA server.