Linux中samba服務(wù)器的基本配置
#======================= Global Settings ===================================== 全局參數(shù)配置,設(shè)置的是針對所有的資源
[global]
# workgroup = NT-Domain-Name or Workgroup-Name ---------------------------- 工作組的名稱(可以不填,默認就這樣)
workgroup = soft
# server string is the equivalent of the NT Description field
server string = Samba Server --------------------------------------------- 對SMB服務(wù)器的簡要說明
hosts allow = 192.168.1. 192.168.2. 127. -------------------------------- 設(shè)置可訪問SMB服務(wù)器的主機(可為IP,主機名,域名)
# Security mode. Most people will want user level security. See
# security_level.txt for details. ------------------------------ 指定SMB服務(wù)器的使用的安全等級。 security = share 指的是當客戶機連入SMB服務(wù)器時,不需要帳號密碼就可以訪問資源。
security = user 指的是當客戶煉乳SMB服務(wù)器時,必須輸入用戶名和密碼才能訪問
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] -----------------------用戶以帳號和密碼訪問,是否允許進入自己的宿主文件夾
comment = Home Directories (默認就這樣,可以不要修改)
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
[printers] ----------------------------打印機配置
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! 共享說明
path = /www/pp 共享文件夾的路徑
write list = smb 允許寫入權(quán)限的用戶列表,smb用戶允許寫入
read list = 只讀權(quán)限的用戶列表
public = yes 是否允許發(fā)布
當安全等級為user時,這時我們在本機建立的用戶必須加入到SMB服務(wù)器中,命令為 smbpasswd -a 用戶 添加LINUX用戶到SMB服務(wù)器中,smbpasswd 用戶名 修改SMB服務(wù)器中用戶的口令
關(guān)鍵詞:Linux,samba服務(wù)器
閱讀本文后您有什么感想? 已有 人給出評價!
- 1
- 1
- 1
- 1
- 1
- 1