How to do File sharing in linux . Samba server installation .
What is samba ?
It is a protocol or an services that allow to share file between different platform or different operating system . We can use samba service to deploy printer service also .
Details about Samba.
1. package --> Samba
2. Port number --> 137, 138, 139
3. Service name --> Smb
4. Configuration file --> /etc/samba/smb.conf
Pre-request things
- Network should be configured .
- Disable the firewall or promot samba through samba .
- Configure Selinux for Samba shared folder or disable.
STEP 1 :-
- yum install samba -y ( Install the samba )
- rpm -qa samba* ( checking all file are install or not )
[ samba-shared ] comment = file shearing server ------> Anything you can add this line .
Path = /Samba-shared
browse able = Yes -----------> For discover by the neighbours system .
Now press ( Shift + : ) and then type ( Wq! ) for save and exit form the editor .
Now start the smb services in your system by pressing this commands that given bellow .
# systemctl status smb
# systemctl start smb
# systemctl enable smb
STEP 4 :-
Now create a user name samba and prompt it as Samba user .
# useradd sahoo ------> Adding user into your pc .
# passwd jet-123 -------> Adding password to the user .
# smb passwd -a sahoo < Press Enter key >
Now type your samba password not your user password and create a new samba password after running this above commands .
STEP 5 :-
Now restart the samba server by just typing : # systemctl restart smb
Then type :- smbclient -L 172.16.200.56 -u samba
- -L :- That link your.
- 172.16.16.200.56 -- my server ip address you add your own server ip address .
- -u :- User
From client side
Open your file manager and then tap on other location and then type inside server address box your samba configuration ip address like this . And after connection will done then type your Username and Password to get your file .
smb://172.16.200.56
That's all about how to do samba server configuration in your pc . I hope you will got your answer . If you have any problem related to this blog or in linux system then please contact me .
No comments