Tuesday, November 19, 2013
Membuat File Sharing tanpa password dengan Samba pada Centos 6
Make directory for sharing:
# mkdir -p /mnt/sharing_smb/
Make a file txt
#cat > /mnt/sharing_smb/test.txt
fill this values
1
2
3
4
5
save with Ctrl + d
Backup smb.conf :
#cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
Setting user access
#chcon -t shamba_share_t /mnt/sharing_smb/
Setting user access :
#chmod a+w /mnt/sharing_smb/
Setting smb.conf
#vim /etc/samba/smb.conf
Fill this values :
[global]
workgroup = WORKGROUP
interfaces = lo eth0
client lanman auth = yes
security = share
[sharing_kusdi]
comment = Data Sharing
path = /mnt/sharing_smb/
browseable = yes
read only = no
guest only = yes
Open firewall for smb service :
#vi /etc/sysconfig/iptables
Add this line :
-A RH-Firewall-1-INPUT -p udp -m udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
or open firewall with IP
-A RH-Firewall-1-INPUT -s 192.9.18.0/24 -m state --state NEW -p tcp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.9.18.0/24 -m state --state NEW -p tcp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.9.18.0/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.9.18.0/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
Restart service samba (service smb and nmb)
# /etc/init.d/smb start
# /etc/init.d/nmb start
Test file sharing from client windows :
open windows explorer :
\\192.9.18.10\
Test file sharing from linux client :
open window explorer :
smb://192.9.18.10/
Good Luck
SAMSUNGGalaxy Mega 6.3 [GT-I9200] - Black
Dual Krait 1.7 GHz, Quad-Band, 6.3" HD Super Clear LCD, Camera, MP3 Player, Video, Bluetooth, Audio, 16 GB storage, 1.5 GB RAM, Android Jelly Bean, Touchscreen
Subscribe to:
Post Comments (Atom)
About Me
|
No comments:
Post a Comment