Linux samba介紹

2017年2月15日00:33:49 3 4,887 ℃

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

進程:

nmbd:  NetBIOS

smbd:文件共享

winbindd: 域(默認不啟用)

/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/test

writable= yes
public=yes

testparm命令:測試/etc/samba/smb.conf語法錯誤

smbpasswd -a :創(chuàng)建共享用戶(先useradd一個用戶 添加寫入setfacl -u:user:rw /www/test)

smbclient命令:

-L netbios_name/IP:主機名

-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

【騰訊云】云服務(wù)器、云數(shù)據(jù)庫、COS、CDN、短信等云產(chǎn)品特惠熱賣中

發(fā)表評論

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前評論:3   其中:訪客  0   博主  0

    • avatar 九州 0

      來看看咯~

      • avatar Feeey個人博客 1

        我又來咯~~無聊來逛逛,情人節(jié)快樂。

        • avatar 九州 0

          簡約不簡單,大氣有內(nèi)涵!