FreeNAS가 LDAP 인증과 작동하도록 하려면 어떻게 해야 합니까?

FreeNAS가 LDAP 인증과 작동하도록 하려면 어떻게 해야 합니까?

LDAP 인증을 사용하는 CIFS 공유가 있는 FreeNAS 9.1.1 서버를 설정하려고 합니다.

저는 OpenLDAP 서버를 설정하고, 여기에 을(를) 입력하고 smbldap-populate, 사용자 계정을 추가하고, 디렉토리를 활용하도록 FreeNAS에 LDAP 클라이언트를 구성했습니다. 내가 보기에는 FreeNAS가 사용자와 그룹을 잘 검색할 수 있는 것 같습니다. getent passwdgetent group출력에는 제가 OpenLDAP 서버에 설정한 엔터티가 나열되어 있기 때문입니다.

여태까지는 그런대로 잘됐다. 이제 새 ZFS 볼륨을 생성하고 이를 내 LDAP 사용자 계정이 소유하도록 설정했습니다.도메인 관리자그룹.

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

이 오류는 무엇을 나타내며 어떻게 해결할 수 있습니까?

답변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)

불일치를 해결하기 위해 sambaSIDFREENAS sambaDomainName항목 을 S-1-5-21-1400563477-347728745-2499486669다음에서 제안한 대로 변경했습니다.이 버그 보고서 댓글.

정확히 어디에서 설정을 망쳤는지는 모르겠지만 디버그 출력으로 Samba를 실행하는 것이 문제의 원인을 찾는 데 핵심이었습니다.

관련 정보