AD 그룹이 삼바 공유에 액세스하도록 허용

AD 그룹이 삼바 공유에 액세스하도록 허용

내 Linux에서는 이와 같은 삼바 공유를 만들었고 제대로 작동합니다.

[global]
    security = user
    passdb backend = tdbsam
    map to guest = Bad User
    guest account = mcms

[mml-t1]
    path = /var/lib/mcms/exports/TPMD01/mml
    writable = no
    guest ok = yes
    guest only = yes

이제 더욱 엄격한 보안 정책으로 인해 새로운 Windows 10 사용자에게 다음 오류가 발생합니다.

조직의 보안 정책이 인증되지 않은 게스트 액세스를 차단하므로 이 공유 폴더에 액세스할 수 없습니다. 이러한 정책은 네트워크의 안전하지 않거나 악의적인 장치로부터 컴퓨터를 보호하는 데 도움이 됩니다.

Active Directory의 그룹을 기반으로 사용자를 허용하고 싶습니다. 나는 이것을 시도했습니다 :

[mml-t1]
        path = /var/lib/mcms/exports/TPMD01/mml
        valid users = @T_UNIX_MCMS
        force user = mcms
        browseable = yes
        read only = yes
        guest ok = no

하지만 작동하지 않습니다. 즉, 연결이 없습니다. 나도 시도했다valid users = +"DOMAIN\T_UNIX_MCMS"

공유를 올바르게 구성해야 합니다.

중요한 점은 Linux 서버가 이미 AD에 연결되어 있다는 것입니다. Linux 서버에서는 su - domscheitWindows AD 자격 증명을 사용하여 쓰기/읽기 권한이 /home/domscheit있는 로컬 사용자를 얻을 수 있습니다 domscheit "domain users".domscheitetc/passwdmcms/var/lib/mcms/exports/TPMD01/mml

저는 Samba 버전 4.7.1을 실행하고 있습니다.

고쳐 쓰다

이것은 내 로그입니다:

[2018/12/25 14:06:00.652804,  5] ../source3/auth/auth.c:524(make_auth3_context_for_ntlm)
  Making default auth method list for server role = 'standalone server', encrypt passwords = yes
[2018/12/25 14:06:00.652872,  5] ../source3/auth/auth.c:48(smb_register_auth)
  Attempting to register auth backend guest
[2018/12/25 14:06:00.652887,  5] ../source3/auth/auth.c:60(smb_register_auth)
  Successfully added auth method 'guest'
[2018/12/25 14:06:00.652923,  5] ../source3/auth/auth.c:48(smb_register_auth)
  Attempting to register auth backend sam
[2018/12/25 14:06:00.652934,  5] ../source3/auth/auth.c:60(smb_register_auth)
  Successfully added auth method 'sam'
[2018/12/25 14:06:00.653067,  5] ../source3/auth/auth.c:48(smb_register_auth)
  Attempting to register auth backend sam_ignoredomain
[2018/12/25 14:06:00.653125,  5] ../source3/auth/auth.c:60(smb_register_auth)
  Successfully added auth method 'sam_ignoredomain'
[2018/12/25 14:06:00.653258,  5] ../source3/auth/auth.c:48(smb_register_auth)
  Attempting to register auth backend sam_netlogon3
[2018/12/25 14:06:00.653317,  5] ../source3/auth/auth.c:60(smb_register_auth)
  Successfully added auth method 'sam_netlogon3'
[2018/12/25 14:06:00.653330,  5] ../source3/auth/auth.c:48(smb_register_auth)
  Attempting to register auth backend winbind
[2018/12/25 14:06:00.653402,  5] ../source3/auth/auth.c:60(smb_register_auth)
  Successfully added auth method 'winbind'
[2018/12/25 14:06:00.653453,  5] ../source3/auth/auth.c:400(load_auth_module)
  load_auth_module: Attempting to find an auth method to match guest
[2018/12/25 14:06:00.653504,  5] ../source3/auth/auth.c:425(load_auth_module)
  load_auth_module: auth method guest has a valid init
[2018/12/25 14:06:00.653577,  5] ../source3/auth/auth.c:400(load_auth_module)
  load_auth_module: Attempting to find an auth method to match sam_ignoredomain
[2018/12/25 14:06:00.653659,  5] ../source3/auth/auth.c:425(load_auth_module)
  load_auth_module: auth method sam_ignoredomain has a valid init
[2018/12/25 14:06:00.654557,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_spnego' registered
[2018/12/25 14:06:00.654625,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_krb5' registered
[2018/12/25 14:06:00.654683,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_krb5_sasl' registered
[2018/12/25 14:06:00.654736,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'spnego' registered
[2018/12/25 14:06:00.654795,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'schannel' registered
[2018/12/25 14:06:00.654869,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'naclrpc_as_system' registered
[2018/12/25 14:06:00.654921,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'sasl-EXTERNAL' registered
[2018/12/25 14:06:00.654973,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'ntlmssp' registered
[2018/12/25 14:06:00.655023,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'ntlmssp_resume_ccache' registered
[2018/12/25 14:06:00.655074,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_basic' registered
[2018/12/25 14:06:00.655126,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_ntlm' registered
[2018/12/25 14:06:00.655176,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_negotiate' registered
[2018/12/25 14:06:00.655292,  5] ../auth/gensec/gensec_start.c:739(gensec_start_mech)
  Starting GENSEC mechanism spnego
[2018/12/25 14:06:00.655378,  5] ../auth/gensec/gensec_start.c:739(gensec_start_mech)
  Starting GENSEC submechanism ntlmssp
[2018/12/25 14:06:00.682627,  5] ../source3/auth/auth.c:524(make_auth3_context_for_ntlm)
  Making default auth method list for server role = 'standalone server', encrypt passwords = yes
[2018/12/25 14:06:00.682682,  5] ../source3/auth/auth.c:400(load_auth_module)
  load_auth_module: Attempting to find an auth method to match guest
[2018/12/25 14:06:00.682697,  5] ../source3/auth/auth.c:425(load_auth_module)
  load_auth_module: auth method guest has a valid init
[2018/12/25 14:06:00.682734,  5] ../source3/auth/auth.c:400(load_auth_module)
  load_auth_module: Attempting to find an auth method to match sam_ignoredomain
[2018/12/25 14:06:00.682760,  5] ../source3/auth/auth.c:425(load_auth_module)
  load_auth_module: auth method sam_ignoredomain has a valid init
[2018/12/25 14:06:00.682863,  5] ../auth/gensec/gensec_start.c:739(gensec_start_mech)
  Starting GENSEC mechanism spnego
[2018/12/25 14:06:00.682953,  5] ../auth/gensec/gensec_start.c:739(gensec_start_mech)
  Starting GENSEC submechanism ntlmssp
[2018/12/25 14:06:00.682990,  3] ../auth/ntlmssp/ntlmssp_util.c:72(debug_ntlmssp_flags)
  Got NTLMSSP neg_flags=0xe2088297
    NTLMSSP_NEGOTIATE_UNICODE
    NTLMSSP_NEGOTIATE_OEM
    NTLMSSP_REQUEST_TARGET
    NTLMSSP_NEGOTIATE_SIGN
    NTLMSSP_NEGOTIATE_LM_KEY
    NTLMSSP_NEGOTIATE_NTLM
    NTLMSSP_NEGOTIATE_ALWAYS_SIGN
    NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
    NTLMSSP_NEGOTIATE_VERSION
    NTLMSSP_NEGOTIATE_128
    NTLMSSP_NEGOTIATE_KEY_EXCH
    NTLMSSP_NEGOTIATE_56
[2018/12/25 14:06:00.705494,  3] ../auth/ntlmssp/ntlmssp_server.c:552(ntlmssp_server_preauth)
  Got user=[domscheit] domain=[SWI] workstation=[CWP1101] len1=24 len2=326
[2018/12/25 14:06:00.705925,  5] ../source3/auth/auth_util.c:122(make_user_info_map)
  Mapping user [SWI]\[domscheit] from workstation [CWP1101]
[2018/12/25 14:06:00.705951,  5] ../source3/auth/user_info.c:64(make_user_info)
  attempting to make a user_info for domscheit (domscheit)
[2018/12/25 14:06:00.705965,  5] ../source3/auth/user_info.c:72(make_user_info)
  making strings for domscheit's user_info struct
[2018/12/25 14:06:00.705988,  5] ../source3/auth/user_info.c:125(make_user_info)
  making blobs for domscheit's user_info struct
[2018/12/25 14:06:00.706006,  3] ../source3/auth/auth.c:189(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user [SWI]\[domscheit]@[CWP1101] with the new password interface
[2018/12/25 14:06:00.706019,  3] ../source3/auth/auth.c:192(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: [SWI]\[domscheit]@[CWP1101]
[2018/12/25 14:06:00.706077,  3] ../source3/auth/check_samsec.c:399(check_sam_security)
  check_sam_security: Couldn't find user 'domscheit' in passdb.
[2018/12/25 14:06:00.706093,  5] ../source3/auth/auth.c:251(auth_check_ntlm_password)
  auth_check_ntlm_password: sam_ignoredomain authentication for user [domscheit] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2018/12/25 14:06:00.706115,  2] ../source3/auth/auth.c:332(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [domscheit] -> [domscheit] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2018/12/25 14:06:00.706128,  3] ../source3/auth/auth_util.c:2214(do_map_to_guest_server_info)
  No such user domscheit [SWI] - using guest account
[2018/12/25 14:06:00.706186,  5] ../auth/ntlmssp/ntlmssp_server.c:1011(ntlmssp_server_postauth)
  server session key is invalid (len == 0), cannot do KEY_EXCH!
[2018/12/25 14:06:00.728317,  1] ../source3/smbd/service.c:521(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED

valid users = SWI\\domscheit테스트를 위해 그룹 이름을 사용하는 대신 개인 계정(및 더 많은 변형)을 사용해 보았습니다. 하지만 항상 같은 오류가 발생합니다.

getent group T_UNIX_MCMS모두 getent passwd domscheit유효한 항목을 반환합니다.

업데이트 2

중요한 주제인 서버 사용량을 찾은 것 같습니다.SSD. 내 생각에는 이것이 많은 "방법..." 페이지에서 제안한 대로 "winbind"를 설치했을 때 서버가 엉망이 된 이유라고 생각합니다. 서버를 다시 실행하려면 백업에서 서버를 복원해야 했습니다.

답변1

여기요.

[2018/12/25 14:06:00.706077,  3] ../source3/auth/check_samsec.c:399(check_sam_security)
check_sam_security: Couldn't find user 'domscheit' in passdb.

이는 Samba의 비밀번호 데이터베이스가 귀하의 사용자 계정을 모른다는 것을 알려줍니다. 이유는 security = user추가했기 때문입니다 passdb backend = tdbsam(로컬 38 사용자 데이터베이스, 유사하지만 독립적임 /etc/passwd). 귀하의 컴퓨터가 이미 AD 도메인에 가입되어 있으므로 이를 인식하고 활용하도록 Samba를 설정해야 합니다.

답변2

답변3

저는 Linux 관리자 중 한 명과 이야기를 나눴습니다. samba + sssd + winbind는 서로 좋은 친구가 아닌 것 같습니다. 즉, 함께 작동하지 않습니다. 그러나 최신 Red Hat 버전(>7.2)에서는 이것이 가능한 것처럼 보이지만 구성이 약간 까다롭습니다.

우리 장소에는 많은 서버가 있으며 단일 전용 서버를 원하지 않습니다. 전체 Linux 환경에 대해 공통적이고 잘 설계된 솔루션을 찾을 때까지 기다리겠습니다. 그 동안 저는 Isilon 스토리지를 사용하여 다른 솔루션을 추구했습니다.

관련 정보