關於samba的基本的3個模式說明

來源:互聯網
上載者:User

 

passdb backend就是使用者背景意思。目前有三種後台:smbpasswd、tdbsam和ldapsam。sam應該是security account manager(安全賬戶管理)的簡寫。

 

1.smbpasswd:該方式是使用smb自己的工具smbpasswd來給系統使用者(真實

使用者或者虛擬使用者)設定一個Samba密碼,用戶端就用這個密碼來訪問Samba的資源。smbpasswd檔案預設在/etc/samba目錄下,不過有時候要手工建立該檔案。

 

2.tdbsam:該方式則是使用一個資料庫檔案來建立使用者資料庫。資料庫檔案叫passdb.tdb,預設在/etc/samba目錄下。passdb.tdb使用者資料庫可以使用smbpasswd –a來建立Samba使用者,不過要建立的Samba使用者必須先是系統使用者。我們也可以使用pdbedit命令來建立Samba賬戶。pdbedit命令的參數很多,我們列出幾個主要的。

pdbedit –a username:建立Samba賬戶。

pdbedit –x username:刪除Samba賬戶。

pdbedit –L:列出Samba使用者列表,讀取passdb.tdb資料庫檔案。

pdbedit –Lv:列出Samba使用者列表的詳細資料。

pdbedit –c “[D]” –u username:暫停該Samba使用者的帳號。

pdbedit –c “[]” –u username:恢複該Samba使用者的帳號。

 

3.ldapsam:該方式則是基於LDAP的賬戶管理方式來驗證使用者。首先要建立LDAP服務,然後設定“passdb backend = ldapsam:ldap://LDAP Server”

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.