1. Server Side Configuration
• To install Samba Packages
yum install samba samba-client samba-common
• Enable Samba through Firewall
firewall-cmd --zone=public --permanent firewall-cmd --reload --add-service=samba
2.disable firewall
systemctl staus firewall.service
vi /etc/samba/smb.conf
3. mkdir -p /samba/apps
cd /samba/apps
ls -ltr
chmod a+rwx samba/apps
chcon -t samba_share_t /samba/apps
Server side Configruation
• Modify /etc/samba/smb.conf file to add our shared dir
[global]
workgroup = SAMBA
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
hosts allow = 11.11.11.0/24
[App]
path = /samba/apps
browsable = yes
writable = yes
guest ok = yes
guest only = yes
read only = no
Part - 2
sudo apt install samba
sudo systemctl enable --now smbd
mkdir Maverick
sudo smbpasswd -a Maverick
[Maverick]
sudo nano /etc/samba/smb.conf
path = /home/maverick/desktop
read only = no
writable = yes
browsable = yes
valid user = maverick
sudo systemctl restart smbd
For public folder in one in the network without password
sudo chown nobody:nogroup /public_folder
sudo chmod g+w,o+w /public_folder
path = /public_folder
guest ok = yes
read only = no
force user = nobody
restart smb service
#networksharing #samba
Comments
Post a Comment