使用唯讀 LDAP 的 Samba 驗證

使用唯讀 LDAP 的 Samba 驗證

我們有一個只讀OpenLDAP伺服器,用於各種身份驗證服務。我目前正在嘗試將一個(獨立)samba伺服器新增到該清單中,該伺服器僅用作備份的儲存空間。除了基本的使用者名稱/密碼身份驗證之外,不需要任何其他內容。

令人難以置信的長列表教學和指南都假設新配置的LDAP伺服器具有完全存取權限。雖然我擁有伺服器的管理員憑證,而且它已經包含所有使用者和填充的 samba 方案,但LDAP伺服器只是一個唯讀鏡像。

目前我的配置...

# LDAP Settings
   passdb backend = ldapsam:ldap://192.168.100.11
   ldap suffix = dc=our-domain,dc=de
   ldap user suffix = ou=people
   ldap admin dn = cn=adminacc,ou=daemonadmins,dc=our-domain,dc=de
   ldap ssl = no
   ldap passwd sync = yes

....失敗:

smbd version 4.2.14-Debian started.
  Copyright Andrew Tridgell and the Samba Team 1992-2014
[2017/01/13 12:52:49.367065,  0] ../source3/passdb/pdb_ldap_util.c:313(smbldap_search_domain_info)
  smbldap_search_domain_info: Adding domain info for SBACKUP failed with NT_STATUS_UNSUCCESSFUL
[2017/01/13 12:52:49.367106,  0] ../source3/passdb/pdb_ldap.c:6534(pdb_ldapsam_init_common)
  pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it.
[2017/01/13 12:52:49.367116,  0] ../source3/passdb/pdb_interface.c:179(make_pdb_method_name)
  pdb backend ldapsam:ldap://192.168.100.11 did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)

這當然並不奇怪。該伺服器是未知的,LDAP並且由於它是唯讀的,因此無法建立新條目。我不明白為什麼有必要先添加有關機器的任何資訊。是否需要配置某種方式 smb 來應對唯讀存取LDAP

如果我netbios name在 my 中明確設定與伺服器smb.conf上現有條目相符的值,LDAP則一切正常。但這有點像駭客,我寧願不改變netbios name


這有點類似不幸的是,它只涵蓋了使用唯讀伺服器的可能性,而不是它的實作。

答案1

samba需要進行讀寫操作,LDAP以便新增/修改機器、信任帳戶和網域工作所需的一些本機使用者(管理員、無人和網域管理員等類似群組)。

ou=people解決方法是:在 samba PDC 上安裝 OpenLDAP,從 master複製一個LDAP唯讀分支(假設:) ;使用覆蓋層將此分支應用到具有分支(本地用戶)glue的讀寫樹下,,(不言自明)。ou=usersou=groupsou=computers

ldap machine suffix = ou=computers
ldap suffix = dc=our-domain,dc=de
# do not set the following; OpenLDAP is
#  able to sort out if a user is a replicated user in 'ou=people'
#  or a local user in 'ou=users'
# ldap group suffix = ou=groups
# ldap user suffix = ou=people

相關內容