# server string is the equivalent of the NT Description field
server string = Samba Server --------------------------------------------- 對(duì)SMB服務(wù)器的簡(jiǎn)要說(shuō)明
# Security mode. Most people will want user level security. See
# security_level.txt for details. ------------------------------ 指定SMB服務(wù)器的使用的安全等級(jí)。 security = share 指的是當(dāng)客戶機(jī)連入SMB服務(wù)器時(shí),不需要帳號(hào)密碼就可以訪問(wèn)資源。
security = user 指的是當(dāng)客戶煉乳SMB服務(wù)器時(shí),必須輸入用戶名和密碼才能訪問(wèn)
security = user
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
#============================ Share Definitions ==============================共享資源參數(shù)配置
[homes] -----------------------用戶以帳號(hào)和密碼訪問(wèn),是否允許進(jìn)入自己的宿主文件夾
comment = Home Directories (默認(rèn)就這樣,可以不要修改)
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
[printers] ----------------------------打印機(jī)配置
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765
[pp] --------------------以下是我所共享的文件夾
comment = this is our soft! 共享說(shuō)明
path = /www/pp 共享文件夾的路徑
write list = smb 允許寫(xiě)入權(quán)限的用戶列表,smb用戶允許寫(xiě)入
read list = 只讀權(quán)限的用戶列表
public = yes 是否允許發(fā)布
當(dāng)安全等級(jí)為user時(shí),這時(shí)我們?cè)诒緳C(jī)建立的用戶必須加入到SMB服務(wù)器中,命令為 smbpasswd -a 用戶 添加LINUX用戶到SMB服務(wù)器中,smbpasswd 用戶名 修改SMB服務(wù)器中用戶的口令