Windows에서 Samba 공유에 액세스할 수 없습니다

Windows에서 Samba 공유에 액세스할 수 없습니다

저는 SLES와 Samba를 처음 사용하기 때문에 도움이 필요합니다. SUSE 11에 Samba를 성공적으로 설정했습니다. Windows에서 액세스할 수 있는 사용자 제한 없이 공유를 생성할 수 있었습니다. 하지만 특정 사용자 그룹만 공유에 액세스할 수 있도록 허용하고 싶습니다. 그래서 저는 "유효한 사용자", "읽기 목록", "쓰기 목록"을 사용하고 있습니다. 하지만 구성 파일에 유효한 사용자를 추가하면 더 이상 공유에 액세스할 수 없습니다. 올바른 자격 증명을 입력했는데도 액세스 거부 오류가 발생합니다. AD 도메인 사용자로 로컬 사용자 계정으로 루트로 시도했습니다. 이 중 어느 것도 작동하지 않습니다. 이 문제를 어떻게 해결할 수 있는지 제안해 주실 수 있나요? 내 smb.conf 파일은 다음과 같습니다.

# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2012-02-03
[global]
    workgroup = *******
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = No
    idmap gid = 10000-20000
    idmap uid = 10000-20000
    realm = ********
    security = ADS
    template homedir = /home/%D/%U
    template shell = /bin/bash
    usershare max shares = 100
    winbind refresh tickets = yes
    wins support = No
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No

[Share]
    inherit acls = Yes
    path = /share/Share
    read only = No
    browseable = Yes
    valid users = @****+Group1, *****+user1

공유에 액세스하려고 할 때 로그 파일의 출력은 다음과 같습니다.

[2013/05/17 15:39:18.753943,  3] lib/access.c:338(allow_access)
  Allowed connection from IP Address(IP Address)
[2013/05/17 15:39:18.754178,  3] smbd/oplock.c:922(init_oplocks)
  init_oplocks: initializing messages.
[2013/05/17 15:39:18.754281,  3] smbd/oplock_linux.c:226(linux_init_kernel_oplocks)
  Linux kernel oplocks enabled
[2013/05/17 15:39:18.754396,  3] smbd/process.c:1662(process_smb)
  Transaction 0 of length 137 (0 toread)
[2013/05/17 15:39:18.754447,  3] smbd/process.c:1467(switch_message)
  switch message SMBnegprot (pid 11575) conn 0x0
[2013/05/17 15:39:18.754827,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [PC NETWORK PROGRAM 1.0]
[2013/05/17 15:39:18.754882,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LANMAN1.0]
[2013/05/17 15:39:18.754922,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [Windows for Workgroups 3.1a]
[2013/05/17 15:39:18.754959,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LM1.2X002]
[2013/05/17 15:39:18.754996,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LANMAN2.1]
[2013/05/17 15:39:18.755035,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NT LM 0.12]
[2013/05/17 15:39:18.755163,  3] smbd/negprot.c:419(reply_nt1)
  using SPNEGO
[2013/05/17 15:39:18.755204,  3] smbd/negprot.c:704(reply_negprot)
  Selected protocol NT LM 0.12
[2013/05/17 15:39:18.757824,  3] smbd/process.c:1662(process_smb)
  Transaction 1 of length 142 (0 toread)
[2013/05/17 15:39:18.757917,  3] smbd/process.c:1467(switch_message)
  switch message SMBsesssetupX (pid 11575) conn 0x0
[2013/05/17 15:39:18.757970,  3] smbd/sesssetup.c:1333(reply_sesssetup_and_X)
  wct=12 flg2=0xc807
[2013/05/17 15:39:18.758013,  2] smbd/sesssetup.c:1279(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2013/05/17 15:39:18.758051,  3] smbd/sesssetup.c:1065(reply_sesssetup_and_X_spnego)
  Doing spnego session setup
[2013/05/17 15:39:18.758091,  3] smbd/sesssetup.c:1107(reply_sesssetup_and_X_spnego)
  NativeOS=[] NativeLanMan=[] PrimaryDomain=[]
[2013/05/17 15:39:18.758159,  3] smbd/sesssetup.c:660(reply_spnego_negotiate)
  reply_spnego_negotiate: Got secblob of size 40
[2013/05/17 15:39:18.758344,  3] ../libcli/auth/ntlmssp.c:34(debug_ntlmssp_flags)
  Got NTLMSSP neg_flags=0xe2088297
[2013/05/17 15:39:18.762052,  3] smbd/process.c:1662(process_smb)
  Transaction 2 of length 486 (0 toread)
[2013/05/17 15:39:18.762108,  3] smbd/process.c:1467(switch_message)
  switch message SMBsesssetupX (pid 11575) conn 0x0
[2013/05/17 15:39:18.762152,  3] smbd/sesssetup.c:1333(reply_sesssetup_and_X)
  wct=12 flg2=0xc807
[2013/05/17 15:39:18.762190,  2] smbd/sesssetup.c:1279(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2013/05/17 15:39:18.762225,  3] smbd/sesssetup.c:1065(reply_sesssetup_and_X_spnego)
  Doing spnego session setup
[2013/05/17 15:39:18.762262,  3] smbd/sesssetup.c:1107(reply_sesssetup_and_X_spnego)
  NativeOS=[] NativeLanMan=[] PrimaryDomain=[]
[2013/05/17 15:39:18.762313,  3] ../libcli/auth/ntlmssp_server.c:348(ntlmssp_server_preauth)
  Got user=[user1] domain=[DOMAINNAME] workstation=[WORKSTATIONNAME] len1=24 len2=246

답변1

이 글을 댓글로 쓰지 않아서 죄송합니다. 하지만 제 담당자는 그럴 만큼 높지 않습니다.

내가 본 것은 +를 도메인과 그룹의 구분 기호로 사용했지만 구성에서 +를 winbind 구분 기호로 설정하지 않았다는 것입니다.

winbind separator = +

또한 passdb 백엔드를 로컬 데이터베이스인 tdbsam으로 설정하고 있습니다. 이것이 아마도 AD 인증이 실패하는 이유일 것입니다.

다음을 설정해 보세요.

workgroup = [SHORTDOMAINNAME]
realm = [KERBEROS REALM / LONG DOMAIN NAME]
password server = [fqdn of your pdc]
winbind use default domain = yes
encrypt passwords = yes
security = ads

영역과 작업 그룹은 모두 대문자여야 하며 'krb5.conf' 파일과 일치해야 합니다.

krb5.conf:

[libdefaults]
    default_realm = [KERBEROS REALM / LONG DOMAIN NAME]
    dns_lookup_realm = true
    dns_lookup_kdc = true
    default_tgs_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5 des3-hmac-sha1
    default_tkt_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5 des3-hmac-sha1
    clockskew = 300
    forwardable = true
    proxiable = true

[realms]
    [KERBEROS REALM / LONG DOMAIN NAME] = {
            kdc = [fqdn of your pdc]
            default_domain = [long domain name lowercase]
    }
[domain_realm]
    .[long domain name lowercase] = [KERBEROS REALM / LONG DOMAIN NAME]
    [long domain name lowercase] = [KERBEROS REALM / LONG DOMAIN NAME]

모든 것이 작동하는지 확인할 수도 있습니다.

wbinfo -u 

그러면 사용자 목록이 표시됩니다

wbinfo -g 

그룹 목록을 보려면

이름에 공백이 있는 그룹이 있는 경우 유효한 사용자의 경우 "에 입력하는 것을 잊지 마세요.

도움이 되길 바랍니다

관련 정보