Showing posts with label Samba configuration in Linux. Show all posts
Showing posts with label Samba configuration in Linux. Show all posts

Friday, May 15, 2020

Samba configuration in Redhat Linux

Samba configuration in Redhat Linux



Today, I want to tell you about Samba configuration in Red Hat Linux. Which is very helpful to understand about sharing a directory from Linux to windows operating system environment.Because in daily routine tasks we have spends more time to login winscp or filezilla to access a file.So Here these are easy steps to configure samba server in linux :-




1. First of all, we have to install samba server utility by using below command :-


[root@rhelnode1 /]# yum -y install samba

2. Then create a directory which you want to share with your windows environment :-

[root@rhelnode1 /]# mkdir -p /home/Amiteshjsk/test

3. Create a group and change group of above created directory :-

[root@rhelnode1 /]# groupadd samba

[root@rhelnode1 /]# chgrp -R samba /home/Amiteshjsk/test
[root@rhelnode1 /]# chmod -R 755 /home/Amiteshjsk/test

4. Add a samba user and set password :-

[root@rhelnode1 /]# useradd Amiteshjsk
[root@rhelnode1 /]# usermod -G samba Amiteshjsk
[root@rhelnode1 /]# smbpasswd -a Amiteshjsk
New SMB password:
Retype new SMB password:
Added user Amiteshjsk.

5.Edit configuration file, by using below lines :-

 [root@rhelnode1 /]# vi /etc/samba/smb.conf

[test]       

path = /home/Amiteshjsk/test
writeable = yes
browseable = yes
valid users = Amiteshjsk
workgroup = workgroup

6. Edit /etc/services and add local loopback address :-


7. After that, Restart services

 [root@rhelnode1 /]# systemctl restart smb.service
[root@rhelnode1 /]# systemctl restart nmb.service

8. Now you can put files in below directory

[root@rhelnode1 /]# cd /home/Amiteshjsk
[root@rhelnode1 test]# mkdir kisna
[root@rhelnode1 test]# touch kisna.txt

9. now you can access from window machine by using ip of host in run command as like you access ftp :-





Introduction to Linux Part 1

Introduction to Linux Part 1

Introduction to Linux Linux is an operating system that works just like Windows and Mac OS X. As an operating system, Linux is a very h...