2015년 8월 20일 목요일

samba server install & conf with centos

yum install samba

chkconfig smb on

mkdir /home/sharename

useradd sharename
passwd sharename

smbpasswd -a sharename ( exist user )

chmod 777 /home/sharename

/etc/samba/smb.conf ( add )
[sharename]
comment = sharename
path = /home/sharename
public = yes
writable = yes
write list = sharename KK
cresate mask = 0777
directory mask = 0777

iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart

/etc/init.d/smb restart

댓글 없음: