आइये देखते हैं की centos 7 पर samba सर्वर कैसे install करते हैं जो की Anonymous access हो .
samba सर्वर एक ओपन source सॉफ्टवेर है जो की linux /unix platform पर run करता है .इसकी सहायता से
windows user linux resources को यूज़ कर सकता है जैसे file and print services
note:- इसके लिए आपकी windows machine और सर्वर का group same होना चाहिए .
Steps:-
इसके लिए following कमांड का यूज़ करें
>net config workstation

centos server easily access हो जाये इसके लिए following pattern अपने सिस्टम की hosts फाइल में add कर दीजिये इसके लिए following यूज कीजिये
>notepad C:\Windows\System32\drivers\etc\hosts

ऊपर pic में 192.168.20.166 linux server ip है
glab2.local linux server hostname है
gcentos एक share name दे दिया है जिस name से आप linux machine को access कर सकते हैं
samba सर्वर को install करने के लिए following run करिए
#yum install samba samba-client samba-common

अब smb.conf का बैकअप ले लीजिये
# cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak
smb.conf file की entries को clear करने के लिए following यूज़ करें
# cat /dev/null > /etc/samba/smb.conf
उसके बाद smb.conf फाइल को ओपन करें और इस प्रकार entry करें
# vi /etc/samba/smb.conf

उसके बाद anonymous directory create कर लें और smb और nmb service को enable और restart कर लें
#mkdir -p /samba/anonymous
#systemctl enable smb.service
#systemctl enable nmb.service
#systemctl restart smb.service
#systemctl restart nmb.service

samba को firewall से allow करने के लिए following करिए
# firewall-cmd –permanent –zone=public –add-service=samba
changes को apply करने के लिए firewall को reload कर लीजिये
#firewall-cmd –reload
anonymous user को allow करने के लिए following permission set कर दीजिये
#cd /samba
#chmod -R 0755 anonymous/
#chown -R nobody:nobody anonymous/
permission check कर लेते हैं
# ls -l anonymous/

samba configuration के लिए हमें selinux को allow करना पड़ेगा
#chcon -t samba_share_t anonymous/
अब कोई भी user linux machine के shared फोल्डर को access कर सकता है
