Linux中samba伺服器的基本配置

來源:互聯網
上載者:User
當安全等級為user時,這時我們在本機建立的使用者必須加入到SMB伺服器中,命令為 smbpasswd -a 使用者 添加LINUX使用者到SMB伺服器中,smbpasswd 使用者名稱 修改SMB伺服器中使用者的口令

#======================= Global Settings ===================================== 全域參數配置,設定的是針對所有的資源
[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伺服器的簡要說明

hosts allow = 192.168.1. 192.168.2. 127. -------------------------------- 設定可訪問SMB伺服器的主機(可為IP,主機名稱,網域名稱)

# Security mode. Most people will want user level security. See
# security_level.txt for details. ------------------------------ 指定SMB伺服器的使用的安全等級。 security = share 指的是當客戶機連入SMB伺服器時,不需要帳號密碼就可以訪問資源。
security = user 指的是當客戶煉乳SMB伺服器時,必須輸入使用者名稱和密碼才能訪問
security = user
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
#============================ Share Definitions ==============================共用資源參數配置
[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 允許寫入許可權的使用者列表,smb使用者允許寫入
read list = 唯讀許可權的使用者列表
public = yes 是否允許發布



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.