Samba Server in Linux | RHCE | Tech ArkIT

Samba Server in Linux | RHCE | Tech ArkIT

for more updates click on subscribe and
click on well button for latest notifications hi friends welcome to TechArkit a YouTube channel my name is Ravi in this video session we are going to see
that how to install and configure the Samba server TechArkit -High Qualirty Video Tutorial like share comment and
subscribe so the SAMBA Server we are going to
install over here and configure so why we need this Samba server basically if
you’d like to share any file system at the any files basically we see that
Linux to Linux you can install and configure the NFS and export the exports
and from the server and mounted to the client and you can share the files from
here to there and one-to-many many to one right but if you would like to say that I have
a Windows machine and I have a Linux machine and maybe I have any any other
operating system which I would like to share this the protocol like the data in
between the Linux and the Windows platform the cross-platform dependency
like the crack cross-platform file sharing how you can do that so this is
what the service you can install our else you can also share the share from
the windows which means that common Internet file system which is CIFS you
can use share that share from the windows and mount it into the line X and
you can write the data over here RL you can also install and configure
the Samba and shade this directory from Linux and go to Windows and access that
same Samba so you can also nowadays in Windows also you can mount the NFS
therapies but that is nor do feasible solution where you have to go
with this assembly with a flexible management for this what we are going to
do over here so for the packages we are going to install is that Samba package
summer package we are going to install on the server side ok and the port is by
default 4:45 we are going to enable using this firewall and SMB and NMB
services we are going to start the configuration file is going to be a /e
TC samba / sm b dot configuration file so
this is the file we are going to edit and write the Samba configuration over
there so let’s see your here how you can install and configure then move it so
basically this is very very useful when you would like to use a cross platform
okay let’s say that M install Samba star so I wanted to install the dependencies
as well the Samba packet is got getting
installed so it will install Samba package and its dependencies and bind
the packages also it will install to bind this Samba shades to the Linux
Windows clients okay enabling now we have to enable the Samba
services ok systemctl enable SMB and similar we have to enable
NMB sorry in MB now you have to start the service okay start SMB and start in
MB ok I can verify that system CTL status SMB
ok which is started and you can also edit by NMB which is also started ok now
we have to allow this firewall role firewall
– CMD – etana permanent i in the ad – I can add service you can also add the
service of the port whatever it is right now I just really love these services then now we just go ahead and configure
the Samba shares so what I am going to do here is that I am just going to
create a one bariatric chords you share ok and you have to verify that you have
to add the selinux context for this battery so before that just verify that
what is the context currently it says that the default underscore t is the
religion which has right from this you have to change it to the Samba share
underscore T which is the Samba share therapy which is going to be changed
over here so in order to change that you have to use C manage C minute is the
command and context I’m just going to change F context – a – t and right your
configuration or here so Samba I’m just going to share over here Samba share
underscore t find in bracket we have to write your directory name so this is the
directory path over here you have to write / Shiv share okay and open the
bracket and close it and add star and question mark all here because if under
the directory if you have any sub directories on the files I’m going to
change all of them their context level because if I do not change this one
right so what happens that some of the files may access one some of the files
may not have executed you can see none right now okay if an LD capital G –
since a which is not a change because I just applied it I did not change it okay
you have to run to be store con – we are F slash directory path okay enter it
sorry which is small V now you can see that LS – LD Jade the share context has
been change in the directory context has been changed to SMB share underscore T
right this is what we record for that directly
to share using this Samba always okay whenever
you have the selinux enabled if a ceramics is not enabled then you no need
to do this okay now what we have to do is that which user you would like to
share example say which you using the which user you would like to share the
Samba so here what I am going to do is that I am just going to add a new user
user add and say that sip user one find / – s and slash bin no shell no login
because this user is going to be a Samba user this is or does not require to
login to thee our machine using the SSH that’s why I just say that they don’t
want to login to the terminal now that common user you have to convert into the
Samba user in order to con convert you have to use SMB password okay – a and
provide them username Sif’s user 1 enter now it will ask you the password
remember the password what you have time because this is the password we are
going to use to access the Samba ser from the remote machine now what I’m
going to do is that I am just going to share this add this user permissions to
that directory 6 share now you can see that LS a fan LD and see this
what is the ownership has been changed to see its user 6 user 1 okay this is
what the permissions are required to write to that directory that’s why I
change the ownership of the directory now you can just verify this user is
properly created and the DBR not okay can use PDB edit –
capital n – V and for what the user name it pulls only the particular user name
details all right don’t I wanted to see all the
users information over here you can simply type that one and you can
see that the user name over here and it’s s ID identification number of that
one and group identification number so all the details you can see you’re here
log in hours and all the stuff right what is the domain and what is the by
default profile path all the home directory path and all the other things
you can see over here right that is the user and user is created fine and we are
going to configure the ships here or here in order to configure you have to
edit d / UTC Samba s MV dot configuration file ok and go to down by
pressing the shift G or here you have already have the definition or here ok
this is the definition you already have you can simply copy paste all here are
else you can also write using this similar configuration all here you have
to open the process and see if I say that share one ok remember this is the
name you how to remember it why I will tell you later ok comment so
come at instance what is the comment what is the shear is all about ok this
is just a name ship share I say gesture if you share I do not have anything over
here let’s say path and what is the path ok she’s say 1 this is the directory
path I am going to share or here find browsable browsable you have to correct the
spelling over here okay yes and valid users add this user name okay see it’s
user one right right double okay this writable can be overwritten by the
directory permissions okay you have to verify this user is correct or not
whether we have given these six user over here six user one that’s correct
okay now this is what the configuration you have to add into the Samba
configuration file in order to share your directory has a severe okay for
syncing user configuration this is what okay
now save it I’m just restarting systemctl and restart SMB find in Abby
right both the services has been restarted now you can go to the client
sites okay fireball we already enable the firewall
okay now we can just go to the system climb system and access this one okay
whether you can access from the Linux are you can also access from the windows
okay let we will see that both how we can access from both okay if you want to
access from the client-side Linux client side okay what you have to do over here
so you have to install six utilities sips your tails this is what the package
you how to install okay the back edge got installed successfully
now what do you have to do so we have to just use this six mounting the command
okay maybe you can create this local directory I say that local says okay and
mount – T and provide this filesystem 6 and I’m going to use this username over
here the username is you have to remember that one username right
username in Guam okay fine slash slash provide that server IP
address are the server name over here if you have okay so my server IP address is
43 or here and go to client 43 and provide the name so the name should be
from thee okay / it is e / Samba / sm b dot without configuration so this is the
name you have to provide there this is an m northeast name okay if you
provide this name the path name it will we not accessible okay this is the share
name you have to provide there in order to access from the client okay
sip sorry not just share one and hit enter do you ask you for the password
into the password then it takes some time to mount it then you can see that D
F F and H command you can see that it’s mounted successfully try to enter into
that directory and now create some test file see that how it goes okay testing
one two three now it says permission denied because we
have to set the permission on the directory site like CH own and the TVA
user 1 and : provide the directory path and ownership will change for that
directory now change thus the pre permissions okay so it’s on 5 okay now
just least out we start this SMB and enemy services and go back to the client
now and see try to create again the file now the file gets created successfully
you can see that test 1 2 3 has been created dear have an H it’s mounted
successfully and go back to the server and see and don’t go to that directory
path and see the file has been created or not yes it is created and now we can
list out that file with the which user permission you got over here so it’s
it’s user 1 so you see you someone guys thanks for
watching stay tuned please subscribe to the channel for more upcoming videos and
kosis please follow us on social networking site if you have any
technical related questions you can ask

4 thoughts on “Samba Server in Linux | RHCE | Tech ArkIT

  1. Hi videos are useful kindly complete the whole Apache web server virtual hosting questions so that can prepare for my exam ty 🙂

  2. Samba Server Installation and Configuration #linux
    RHCE Playlist:

Leave a Reply

Your email address will not be published. Required fields are marked *