não pode acessar a pasta compartilhada do windows 7 via samba 4.2.10-Debian NT_STATUS_ACCESS_DENIED & NT_STATUS_BAD_NETWORK_NAME

1

Bem, funcionou antes da atualização do badlock, não bem, mas funcionou. Agora estou apenas recebendo NT_STATUS_ACCESS_DENIED & %código%. A única coisa que eu coloquei no meu NT_STATUS_BAD_NETWORK_NAME é o nome do netbios. As pastas do Windows7 são acessíveis através da conta de convidado sem uma senha. Eu pesquisei o meu a ... muito e só posso encontrar respostas principalmente para o contrário, variando de definir algumas opções no smb.conf para uma nova instalação completa do servidor (eu não posso fazer isso). Eu sou a única máquina Debian na rede. Existem alguns Mac's também. Eles não têm problemas.

isto é o que recebo do nível de depuração 10:

INFO: Current debug levels:
  all: 10
  tdb: 10
  printdrivers: 10
  lanman: 10
  smb: 10
  rpc_parse: 10
  rpc_srv: 10
  rpc_cli: 10
  passdb: 10
  sam: 10
  auth: 10
  winbind: 10
  vfs: 10
  idmap: 10
  quota: 10
  acls: 10
  locking: 10
  msdfs: 10
  dmapi: 10
  registry: 10
  scavenger: 10
  dns: 10
  ldb: 10
lp_load_ex: refreshing parameters
Initialising global parameters
INFO: Current debug levels:
  all: 10
  tdb: 10
  printdrivers: 10
  lanman: 10
  smb: 10
  rpc_parse: 10
  rpc_srv: 10
  rpc_cli: 10
  passdb: 10
  sam: 10
  auth: 10
  winbind: 10
  vfs: 10
  idmap: 10
  quota: 10
  acls: 10
  locking: 10
  msdfs: 10
  dmapi: 10
  registry: 10
  scavenger: 10
  dns: 10
  ldb: 10
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter netbios name = ALFRED
doing parameter wins server = 192.168.0.7
doing parameter dns proxy = no
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter syslog = 0
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter server role = standalone server
doing parameter passdb backend = tdbsam
doing parameter obey pam restrictions = yes
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
lp_servicenumber: couldn't find homes
added interface eth0 ip=192.168.0.201 bcast=192.168.0.255 netmask=255.255.255.0
added interface vboxnet0 ip=192.168.56.1 bcast=192.168.56.255 netmask=255.255.255.0
Netbios name list:-
my_netbios_names[0]="ALFRED"
Client started (version 4.2.10-Debian).
Enter root's password: 
Opening cache file at /var/cache/samba/gencache.tdb
Opening cache file at /var/run/samba/gencache_notrans.tdb
sitename_fetch: No stored sitename for 
internal_resolve_name: looking up alfred#20 (sitename (null))
Adding cache entry with key=[NBT/ALFRED#20] and timeout=[Thu Jan  1 01:00:00 AM 1970 CET] (-1460977463 seconds in the past)
no entry for alfred#20 found.
resolve_lmhosts: Attempting lmhosts lookup for name alfred<0x20>
resolve_lmhosts: Attempting lmhosts lookup for name alfred<0x20>
startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was No such file or directory
wins_srv_is_dead: 192.168.0.7 is alive
resolve_wins: using WINS server 192.168.0.7 and tag '*'
parse_nmb: packet id = 14155
nmb packet from 192.168.0.7(35072) header: id=14155 opcode=Query(0) response=Yes
    header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=ALFRED<20> rr_type=32 rr_class=1 ttl=300000
    answers   0 char ......   hex 0000C0A80007
Got a positive name query response from 192.168.0.7 ( 192.168.0.7 )
remove_duplicate_addrs2: looking for duplicate address/port pairs
namecache_store: storing 1 address for alfred#20: 192.168.0.7
Adding cache entry with key=[NBT/ALFRED#20] and timeout=[Mon Apr 18 01:15:23 PM 2016 CEST] (660 seconds ahead)
internal_resolve_name: returning 1 addresses: 192.168.0.7:0 
Connecting to 192.168.0.7 at port 445
Socket options:
    SO_KEEPALIVE = 0
    SO_REUSEADDR = 0
    SO_BROADCAST = 0
    TCP_NODELAY = 1
    TCP_KEEPCNT = 9
    TCP_KEEPIDLE = 7200
    TCP_KEEPINTVL = 75
    IPTOS_LOWDELAY = 0
    IPTOS_THROUGHPUT = 0
    SO_REUSEPORT = 0
    SO_SNDBUF = 87040
    SO_RCVBUF = 372480
    SO_SNDLOWAT = 1
    SO_RCVLOWAT = 1
    SO_SNDTIMEO = 0
    SO_RCVTIMEO = 0
    TCP_QUICKACK = 1
    TCP_DEFER_ACCEPT = 0
 session request ok
Doing spnego session setup (blob length=42)
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.3.6.1.4.1.311.2.2.10
got principal=<null>
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Starting GENSEC mechanism spnego
Starting GENSEC submechanism ntlmssp
     negotiate: struct NEGOTIATE_MESSAGE
        Signature                : 'NTLMSSP'
        MessageType              : NtLmNegotiate (1)
        NegotiateFlags           : 0x62088215 (1644724757)
               1: NTLMSSP_NEGOTIATE_UNICODE
               0: NTLMSSP_NEGOTIATE_OEM    
               1: NTLMSSP_REQUEST_TARGET   
               1: NTLMSSP_NEGOTIATE_SIGN   
               0: NTLMSSP_NEGOTIATE_SEAL   
               0: NTLMSSP_NEGOTIATE_DATAGRAM
               0: NTLMSSP_NEGOTIATE_LM_KEY 
               0: NTLMSSP_NEGOTIATE_NETWARE
               1: NTLMSSP_NEGOTIATE_NTLM   
               0: NTLMSSP_NEGOTIATE_NT_ONLY
               0: NTLMSSP_ANONYMOUS        
               0: NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED
               0: NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED
               0: NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL
               1: NTLMSSP_NEGOTIATE_ALWAYS_SIGN
               0: NTLMSSP_TARGET_TYPE_DOMAIN
               0: NTLMSSP_TARGET_TYPE_SERVER
               0: NTLMSSP_TARGET_TYPE_SHARE
               1: NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
               0: NTLMSSP_NEGOTIATE_IDENTIFY
               0: NTLMSSP_REQUEST_NON_NT_SESSION_KEY
               0: NTLMSSP_NEGOTIATE_TARGET_INFO
               1: NTLMSSP_NEGOTIATE_VERSION
               1: NTLMSSP_NEGOTIATE_128    
               1: NTLMSSP_NEGOTIATE_KEY_EXCH
               0: NTLMSSP_NEGOTIATE_56     
        DomainNameLen            : 0x0000 (0)
        DomainNameMaxLen         : 0x0000 (0)
        DomainName               : *
            DomainName               : ''
        WorkstationLen           : 0x0000 (0)
        WorkstationMaxLen        : 0x0000 (0)
        Workstation              : *
            Workstation              : ''
        Version: struct ntlmssp_VERSION
            ProductMajorVersion      : NTLMSSP_WINDOWS_MAJOR_VERSION_6 (6)
            ProductMinorVersion      : NTLMSSP_WINDOWS_MINOR_VERSION_1 (1)
            ProductBuild             : 0x0000 (0)
            Reserved: ARRAY(3)
                [0]                      : 0x00 (0)
                [1]                      : 0x00 (0)
                [2]                      : 0x00 (0)
            NTLMRevisionCurrent      : NTLMSSP_REVISION_W2K3 (15)
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
  NTLMSSP_NEGOTIATE_UNICODE
  NTLMSSP_REQUEST_TARGET
  NTLMSSP_NEGOTIATE_SIGN
  NTLMSSP_NEGOTIATE_NTLM
  NTLMSSP_NEGOTIATE_ALWAYS_SIGN
  NTLMSSP_TARGET_TYPE_SERVER
  NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
  NTLMSSP_NEGOTIATE_TARGET_INFO
  NTLMSSP_NEGOTIATE_VERSION
  NTLMSSP_NEGOTIATE_128
  NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
  NTLMSSP_NEGOTIATE_UNICODE
  NTLMSSP_REQUEST_TARGET
  NTLMSSP_NEGOTIATE_SIGN
  NTLMSSP_NEGOTIATE_NTLM
  NTLMSSP_NEGOTIATE_ALWAYS_SIGN
  NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
  NTLMSSP_NEGOTIATE_VERSION
  NTLMSSP_NEGOTIATE_128
  NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
  NTLMSSP_NEGOTIATE_UNICODE
  NTLMSSP_REQUEST_TARGET
  NTLMSSP_NEGOTIATE_SIGN
  NTLMSSP_NEGOTIATE_NTLM
  NTLMSSP_NEGOTIATE_ALWAYS_SIGN
  NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
  NTLMSSP_NEGOTIATE_VERSION
  NTLMSSP_NEGOTIATE_128
  NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP packet check failed due to short signature (0 bytes)!
BAD SIG NTLM2: wanted signature of
[0000] 01 00 00 00 7F C6 0E DF   CA 2E 42 25 00 00 00 00   ........ ..B%....
BAD SIG: got signature of
NTLMSSP NTLM2 packet check failed due to invalid signature!
GENSEC SPNEGO: failed to verify mechListMIC: NT_STATUS_ACCESS_DENIED
SPNEGO login failed: Access denied
Anonymous login successful
cli_init_creds: user  domain WORKGROUP
Domain=[WORKGROUP] OS=[Windows 7 Ultimate 7601 Service Pack 1] Server=[Windows 7 Ultimate 6.1]
 session setup ok
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
    
por steros 18.04.2016 / 13:13

1 resposta

2

Eu experimentei o mesmo problema (no debian) e passei um dia inteiro resolvendo isso. No final, só consegui fazer o downgrade de alguns pacotes (libsmbclient em particular) e o problema desapareceu.

Aqui você pode encontrar informações úteis sobre como fazer downgrade: link

O comando exato usado para fazer o download de 4.2.10 a 4.1.17 é:

# aptitude install samba=2:4.1.17+dfsg-2+deb8u2 samba-common=2:4.1.17+dfsg-2+deb8u2 samba-libs=2:4.1.17+dfsg-2+deb8u2 smbclient=2:4.1.17+dfsg-2+deb8u2 python-samba=2:4.1.17+dfsg-2+deb8u2 samba-common-bin=2:4.1.17+dfsg-2+deb8u2 samba-libs=2:4.1.17+dfsg-2+deb8u2 samba-dsdb-modules=2:4.1.17+dfsg-2+deb8u2 samba-vfs-modules=2:4.1.17+dfsg-2+deb8u2 libsmbclient=2:4.1.17+dfsg-2+deb8u2 samba-libs=2:4.1.17+dfsg-2+deb8u2 libldb1=2:1.1.17-2+deb8u1 python-ldb=2:1.1.17-2+deb8u1 libwbclient0:amd64=2:4.1.17+dfsg-2+deb8u2

Devido a diferentes pacotes instalados no sistema, versões não atendidas precisam ser resolvidas se existirem.

    
por 20.04.2016 / 08:07