linux/unix
NetBIOS
CIFS/SMB
Winbindd
LDAP(Openldap)
netbios端口:
137/udp(netbios),138/udp
139/tcp
445/tcp(共享文件端口)
安裝:
#yum install samba4 samba4-client samba4-common -y
進(jìn)程:
nmbd: NetBIOS
smbd:文件共享
winbindd: 域(默認(rèn)不啟用)
/etc/rc.d/init.d/smb
/etc/samba/
samba.conf
[shared_name]
comment = All Printers
path = /var/spool/samba
browseable = 是否被瀏覽public= 是否被所有用戶訪問
read only
writable= yes/no
write_list =user1, user2
@group,+group
valid_users=白名單
invalid_users=黑名單create mask=0644
共享/share/test
[tools]comment =share testing
path=/share/testwritable= yes
public=yestestparm命令:測試/etc/samba/smb.conf語法錯誤
smbpasswd -a :創(chuàng)建共享用戶(先useradd一個用戶 添加寫入setfacl -u:user:rw /www/test)
smbclient命令:
-L netbios_name/IP:主機(jī)名
-U username
smbclient //IP/共享目名 -U username
mount -t cifs //IP/共享名 -o username=user
掛載:
//IP/共享名 /掛載目錄 cifs credentials=/etc/samba/cred.passwd 0 0
#vim /etc/samba/cred.passwd
username=
password=
#chmod og=--- /etc/samba/cred.passwd
samba:基于IP的訪問控制
iptables:
tcp:139,445
udp:137,138
samba.conf
hosts allow = 127. 192.168.12. 192.168.13.
samba-swat
web GUI
2017年2月10日 下午12:54 沙發(fā)
來看看咯~
2017年2月14日 下午9:26 板凳
我又來咯~~無聊來逛逛,情人節(jié)快樂。
2017年2月19日 上午10:59 地板
簡約不簡單,大氣有內(nèi)涵!