// install
# yum install samba samba-client samba-common -y
// firewall
# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
# /etc/init.d/iptables restart
// add samba user
# smbpasswd -a user1 // 須在系統上有相同的帳號
// set share directory
# vi /etc/samba/smb.conf
[global]
security = user
[share]
comment = Share Storage
path = /mnt/datadisk
browsable = yes
guest ok = yes
read only = no
valid users = user1 user2
// restart services
# /etc/init.d/smb restart
Reference :
Samba Add a User
沒有留言:
張貼留言