smbclient não pode se conectar ao Windows Server 2012 R2

1

Cliente SAMBA: Ubuntu 14.04.5 LTS
Servidor SAMBA: Windows Server 2012 R2 Standard
Eu executei o seguinte comando smbclient -d3 -L //10.2.3.111/Files -A /home/acteam/.smbcredentials e recebi o erro NT_STATUS_RESOURCE_NAME_NOT_FOUND

[acteam@irv-guen] - [~] - [2017-08-03 21:32:12]
[0] smbclient -d3 -L //10.2.3.111/Files -A /home/acteam/.smbcredentials     lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
WARNING: The "syslog" option is deprecated
added interface eth0 ip=10.2.3.127 bcast=10.2.3.255 netmask=255.255.255.0
Client started (version 4.3.11-Ubuntu).
Connecting to 10.2.3.111 at port 445
Doing spnego session setup (blob length=120)
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.2.840.48018.1.2.2
got OID=1.2.840.113554.1.2.2
got OID=1.2.840.113554.1.2.2.3
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
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
Got challenge flags:
Got NTLMSSP neg_flags=0x62898215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
Domain=[TMGRID] OS=[Windows Server 2012 R2 Standard 9600] Server=[Windows Server 2012 R2 Standard 6.3]

        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        Files           Disk
        IPC$            IPC       Remote IPC
        MappedDrive     Disk
Connecting to 10.2.3.111 at port 139
Connecting to 10.2.3.111 at port 139
Connection to 10.2.3.111 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled -- no workgroup available

No lado do Windows Server, o NetBios está ativado: NetBios via TCP / IP ativado no Windows Server 2012 R2
Este Windows Server não entra em nenhum GRUPO DE TRABALHO. Ele usa o domínio "tmgrid.local" Sistema Windows Server 2012 R2

Referi-me ao ubuntuforums.org/showthread.php?t=2295552&p=13360352#post13360352, mas esse segmento também não foi resolvido.

    
por MikimotoH 04.08.2017 / 06:55

1 resposta

1

Eu resolvi o problema corrigindo o arquivo ~ / .smbcredentials .
Antes, o conteúdo do arquivo ~ / .smbcredentials é:

username=TMGRID/AppControlTeam
password=************

Corri sudo mount causará a mensagem de erro

[acteam@irv-guen] - [~] - [2017-08-04 00:54:59]
[32] sudo mount -vvv -t cifs -o credentials=/home/acteam/.smbcredentials,sec=ntlm //10.2.3.111/Files /media/IRV-GUEN-WINF_Files
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "//10.2.3.111/Files"
mount: node:  "/media/IRV-GUEN-WINF_Files"
mount: types: "cifs"
mount: opts:  "credentials=/home/acteam/.smbcredentials,sec=ntlm"
mount: external mount: argv[0] = "/sbin/mount.cifs"
mount: external mount: argv[1] = "//10.2.3.111/Files"
mount: external mount: argv[2] = "/media/IRV-GUEN-WINF_Files"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,credentials=/home/acteam/.smbcredentials,sec=ntlm"
mount.cifs kernel mount options: ip=10.2.3.111,unc=\10.2.3.111\Files,sec=ntlm,user=TMGRID/AppControlTeam,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

O / var / log / syslog é

Aug  4 00:59:03 irv-guen kernel: [50881.183164] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Aug  4 00:59:03 irv-guen kernel: [50881.183171] CIFS VFS: Send error in SessSetup = -13
Aug  4 00:59:03 irv-guen kernel: [50881.183363] CIFS VFS: cifs_mount failed w/return code = -13

Depois de modificar o conteúdo do arquivo ~ / .smbcredentials para:

username=AppControlTeam
password=***********
domain=tmgrid.local

e executou sudo mount o resultado é

[acteam@irv-guen] - [~] - [2017-08-04 00:59:03]
[32] sudo mount -vv -t cifs -o credentials=/home/acteam/.smbcredentials,sec=ntlm //10.2.3.111/Files /media/IRV-GUEN-WINF_Files
domain=tmgrid.local
mount.cifs kernel mount options: ip=10.2.3.111,unc=\10.2.3.111\Files,sec=ntlm,user=AppControlTeam,,domain=tmgrid.local,pass=********

Agora posso navegar pela pasta compartilhada do Windows montada

[acteam@irv-guen] - [~] - [2017-08-04 01:02:58]
[0] l /media/IRV-GUEN-WINF_Files
total 8.0K
drwxr-xr-x 2 root root 4.0K Aug  3 02:14 .
drwxr-xr-x 5 root root 4.0K Aug  4 00:53 ..
drwxr-xr-x 2 root root    0 Jul 10 02:11 Archive
drwxr-xr-x 2 root root    0 Jul 27 04:21 ExtractedDirectory
drwxr-xr-x 2 root root    0 Aug  3 02:14 GUEN_Linux
drwxr-xr-x 2 root root    0 Aug  2 06:58 GUEN_QA
drwxr-xr-x 2 root root    0 Jul 10 02:14 PackageDirectory
drwxr-xr-x 2 root root    0 Jul 31 01:46 SamplesForQATesting
    
por MikimotoH 04.08.2017 / 10:24