独立的 Linux Samba 服务器由 AD LDAP 后端进行身份验证?

独立的 Linux Samba 服务器由 AD LDAP 后端进行身份验证?

我正在尝试让独立 Samba 服务器(未加入域)通过 Windows AD DS LDAP 进行身份验证。我觉得文档这里不太正确,因为我无法让它以这种方式工作。

在最初失败后,我对文档的配置进行了一些扩展,但 Samba 仍然无法启动:

[2021/04/23 16:02:59.404293,  0] ../../source3/smbd/server.c:1775(main)
  smbd version 4.11.6-Ubuntu started.
  Copyright Andrew Tridgell and the Samba Team 1992-2019
[2021/04/23 16:02:59.410542,  1] ../../source3/profile/profile_dummy.c:30(set_profile_level)
  INFO: Profiling support unavailable in this build.
[2021/04/23 16:02:59.435968,  1] ../../source3/passdb/pdb_ldap_util.c:235(add_new_domain_info)
  add_new_domain_info: failed to add domain dn= sambaDomainName=RV-HR,DC=RV-Ing,DC=loc with: No such attribute
        00000057: LdapErr: DSID-0C090E48, comment: Error in attribute conversion operation, data 0, v2580
[2021/04/23 16:02:59.436031,  0] ../../source3/passdb/pdb_ldap_util.c:313(smbldap_search_domain_info)
  smbldap_search_domain_info: Adding domain info for RV-HR failed with NT_STATUS_UNSUCCESSFUL
[2021/04/23 16:02:59.436059,  0] ../../source3/passdb/pdb_ldap.c:6752(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.
[2021/04/23 16:02:59.436075,  0] ../../source3/passdb/pdb_interface.c:179(make_pdb_method_name)
  pdb backend ldapsam:ldap://192.168.10.42 did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)

当前smb.conf看起来像这样:

[global]
   #workgroup = RV-ING.loc

   server string = RV-HR
   netbios name = RV-HR
   realm = RV-ING.loc

   security = user
   passdb backend = ldapsam:ldap://192.168.10.42
   ldap suffix = DC=RV-Ing,DC=loc
   ldap admin dn = CN=adquery,OU=service,DC=RV-ING,DC=loc
   ldap user suffix = OU=Mitarbeiter,OU=RV
   ldap group suffix = OU=Gruppen,OU=RV
   ldap machine suffix = OU=Computer,OU=RV
   ldap passwd sync = no
   ldap delete dn = no
   ldap ssl      = no
   ldap debug level = 4

   log file = /var/log/samba/log.%m
   log level = 1 auth_audit:2
   log level = 1 auth_audit:3@/var/log/samba/samba_auth_audit.log
   max log size = 1000

   logging = file
   panic action = /usr/share/samba/panic-action %d

   server role = standalone server
   unix password sync = no

#======================= Share Definitions =======================

[Testshare]
    path = /media/GF
    directory mask = 0775
    public = yes
    writable = yes
    comment = HR Share
    printable = no
    guest ok = yes
    browseable = yes
    vfs object = full_audit
    force user = nobody
    force group = nogroup
    # server signing = mandatory

我也考虑过使用 PAM 来代替 LDAP 身份验证,但可能对此了解不够。关于如何让 SAMBA 与 LDAP 身份验证一起使用有什么想法吗?

相关内容