FTP
tcp/ip:应用层
NFS(RPC)

cifs/smb/netbios

cifs(common internet file system):通用互联网协议
smb(service message block):服务信息块
netbios:(winns)
UNC:\ip\shared_path

linux/unix
netbios
cifs/smb
winbind
ldap(openldap)
windows

137/udp(netbios),138/udp
139/tcp
445/tcp

访问Samba服务,采用的是系统用户,但账号密码由Samba来产生,保障了安全

共享权限
文件系统权限

安装配置Samba
yum install Samba-client Samba-common Samba

nmbd:netbios
smbd:share(文件共享)
winbind

/etc/init.d/smb
/etc/Samba/smb.conf
宏:变量

vim /etc/Samba/smb.conf
[global]
workgroup = WORKGROUP
[share_name]
common =
path =
browsealbe =
public =
read only =
writetable =
write list = user1,user2/@group,+group
valid users =
invalid users =

smbpasswd -a suer1

smbclient -L netbios_name -U username
smbclient //192.168.1.20 -U user1

mount -t cifs //192.168.1.20/share /mnt

vim /etc/fstab
//192.168.1.20/share /mnt cifs criedentials /etc/samba/cred.passwd 0 0

Samba:基于IP的访问控制
iptables:
139,445
137,138

Samba
hosts allow = 192.168. 127.

Samba-swat
web GUI

守护进程: