首頁>Server>source

我正在尝試使用LDAP身份驗證設置帶有CIFS共享的FreeNAS 9.1.1服務器。

我已经建立了一个OpenLDAP服務器,用 smbldap-populate填充它 ,為我自己添加了一个使用者帐戶,並在FreeNAS上配置了LDAP客戶端以使用该目錄.在我看来,FreeNAS可以檢索使用者和群組,如 getent passwd   和 getent group   輸出列出了我在OpenLDAP服務器上設置的實體。

到目前為止一切順利.我現在已经建立了一个新的zFS卷,並將其設置為由我的LDAP使用者帐戶和 Domain Admins拥有   基。

当我現在尝試使用共享時,通過發佈 net use \\freenas\zfs0-share   在我的windows命令列上,我得到以下結果:

System error 59 has occured.
An unexpected network error occurred.

在我的FreeNAS控製台中,我得到以下輸出:

freenas smbd: auth/check_samsec.c:491(check_sam_security)
check_sam_security: make_server_info_sam() failed with NT_STATUS_UNSUCCESSFUL

此錯誤表示什麼以及如何解決?

最新回復
  • 2019-9-15
    1 #

    為了找到匯致此問题的原因,我首先以更高的除錯級別以互動模式啟動Samba,以查看輸出中的任何訊息 這可能会有所帮助:

    /usr/local/sbin/smbd --interactive --debuglevel=3
    

    現在我得到了比以前更多的有用輸出:

    check_ntlm_password:  Checking password for unmapped user [WORKGROUP]\[osalzburg]@[LDAP] with the new password interface
    check_ntlm_password:  mapped user is: [FREENAS]\[osalzburg]@[LDAP]
    init_sam_from_ldap: Entry found for user: osalzburg
    Primary group S-1-5-21-1400563477-347728745-2499486669-512 for user osalzburg is a UNKNOWN and not a domain group
    Forcing Primary Group to 'Domain Users' for osalzburg
    The primary group domain sid(S-1-5-21-1134279832-878937066-538846017-513) does not match the domain sid(S-1-5-21-1400563477-347728745-2499486669) for osalzburg(S-1-5-21-1400563477-347728745-2499486669-3002)
    check_sam_security: make_server_info_sam() failed with 'NT_STATUS_UNSUCCESSFUL'
    check_ntlm_password:  Authentication for user [osalzburg] -> [osalzburg] FAILED with error NT_STATUS_UNSUCCESSFUL
    error packet at smbd/sesssetup.c(124) cmd=115 (SMBsesssetupX) NT_STATUS_UNSUCCESSFUL
    Server exit (failed to receive smb request)
    Terminated: 15
    

    這裏的關键是部分:

    The primary group domain sid
      (S-1-5-21-1134279832-878937066-538846017-513) does not match the domain sid
      (S-1-5-21-1400563477-347728745-2499486669) for osalzburg(S-1-5-21-1400563477-347728745-2499486669-3002)
    

    為了解決不匹配問题,我改變了 sambaSID   我的 FREENAS   sambaDomainName   进入 S-1-5-21-1400563477-347728745-2499486669   正如此錯誤報告評論中所建議的那樣。

    我不確定我在哪裏搞砸了我的設置,但執行帶有除錯輸出的Samba是找到問题原因的關键。

  • https:Haproxy(SSL)背後的Gitlab
  • ubuntu:Postfix - SMTP郵件傳遞失败,出現"連線超時"錯誤