Advertisements

Tag Archives: samba

smbclient receiving error message: protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED

I have a Red Hat Enterprise Linux 7.5 server that is not connecting to a Windows share

root@linux:~ # cat /etc/*release
NAME=”Red Hat Enterprise Linux Server”
VERSION=”7.5 (Maipo)”
ID=”rhel”
ID_LIKE=”fedora”
VARIANT=”Server”
VARIANT_ID=”server”
VERSION_ID=”7.5″
PRETTY_NAME=”Red Hat Enterprise Linux”
ANSI_COLOR=”0;31″
CPE_NAME=”cpe:/o:redhat:enterprise_linux:7.5:GA:server”
HOME_URL=”https://www.redhat.com/”
BUG_REPORT_URL=”https://bugzilla.redhat.com/”

REDHAT_BUGZILLA_PRODUCT=”Red Hat Enterprise Linux 7″
REDHAT_BUGZILLA_PRODUCT_VERSION=7.5
REDHAT_SUPPORT_PRODUCT=”Red Hat Enterprise Linux”
REDHAT_SUPPORT_PRODUCT_VERSION=”7.5″
Red Hat Enterprise Linux Server release 7.5 (Maipo)
Red Hat Enterprise Linux Server release 7.5 (Maipo)

samba rebased to version 4.6.2

To improve security, the NT LAN manager version 1 (NTLMv1) protocol is now disabled by default. If you require the insecure NTLMv1 protocol, set the ntlm auth parameter in the /etc/samba/smb.conf file to yes.

The storage was upgraded so my RHEL 7.5 server is the client trying to connect to the Windows share. It is showing the message protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED

root@linux:~ # smbclient //storageserver/PUBLICO -U “setaoffice/username%PASSWORD” -c ‘prompt; cd CC_EFC_Inbound/Logs; mget *.log’
protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED

To solve the problem, I had to add -m SMB2 or -m SMB3 to the smbclient

root@linux:~ # smbclient //storageserver/PUBLICO -U “setaoffice/username%PASSWORD” -m SMB2 -c ‘prompt; cd CC_EFC_Inbound/Logs; mget *.log’
Kinit for username@SETAOFFICE to access storageserver failed: Cannot find KDC for requested realm
session setup failed: NT_STATUS_WRONG_PASSWORD

Advertisements

Dirty and fast way to mount a Windows shared folder

Here is a dirty and fast way to mount a Windows shared folder:

  • Check what the Windows server is providing with smbclient:

root@linux:/ # smbclient –L <hostname> -W <domain> -U <user>

root@linux:/ # smbclient -L CORESERVER -W WINLLAB -U nimda
Password:
Domain=[WINLAB] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

Sharename Type Comment
——— —- ——-
C$ Disk Default share
F$ Disk Default share
IPC$ IPC Remote IPC
Resources$ Disk “Event logging files”
ADMIN$ Disk Remote Admin
Address Disk “Access to address objects”
Domain=[WINLAB] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

Server Comment
——— ——-
CORESERVER2 DC / DHCP / WINS / DNS /PS
CORESERVER3 LCS [ST : ]
CORESERVER EXCHANGE [ST : CV1FX81]

Workgroup Master
——— ——-
SYSADM
MYGROUP SERVERCORE

  • Mounting the Windows Shared folder on RHEL5

root@linux:/ # mount -t cifs <hostname>:<share> <mount point on Linux> -ousername=<username>,domain=<domain>

root@linux:/ # mount -t cifs CORESERVER:F\$ /mnt/temp -ousername=nimda,domain=WINLAB
Password:

# cd /mnt/temp
# ls -lh
total 27G
drwxrwxrwx 1 root root 0 Jan 31 08:52 Arquivos
-rwxrwSrwt 1 root root 214M Feb 27 16:40 CD_sun4u_sparcv9__marTux_0.2__small_naked_demo_cd_bs512b.iso.bz2
-rwxrwSrwt 1 root root 2.3G Nov 19 16:33 CentOS-4.6-i386-binDVD.iso
-rwxrwSrwt 1 root root 3.6G Nov 24 19:31 CentOS-5.1-i386-bin-DVD.iso
-rwxrwSrwt 1 root root 5.6G Jan 15 14:47 eis-dvd.ISO
-rwxrwSrwt 1 root root 3.2G Nov 2 14:05 Fedora-8-i386-DVD.iso
-rwxrwSrwt 1 root root 647M Feb 14 07:22 in-preview2.iso
-rwxrwSrwt 1 root root 630M Nov 1 01:52 in-preview.iso
-rwxrwSrwt 1 root root 1.4G Feb 11 08:37 n1sm-1.3.3-ga-linux-x86.iso
-rwxrwSrwt 1 root root 251M Feb 15 12:07 oracle-xe-univ-10.2.0.1-1.0.i386.rpm
-rwxrwSrwt 1 root root 2.2G Feb 12 10:37 RHEL4.6-i386-AS-DVD.iso
-rwxrwSrwt 1 root root 3.4G Jan 21 14:03 sol-nv-b70b-x86-dvd.iso
-rwxrwSrwt 1 root root 932M Feb 6 13:50 SunSXDE108-1.zip
-rwxrwSrwt 1 root root 1.3G Feb 6 13:07 SunSXDE108-2.zip
-rwxrwSrwt 1 root root 338M Jun 28 2007 sxrt5.0x64_x86_5.0x64a.dvd2.tar.gz
-rwxrwSrwt 1 root root 163M Jan 6 14:46 systemrescuecd-x86-0.4.2.iso
-rwxrwSrwt 1 root root 394M Feb 28 09:15 ubuntu-6.06.2-server-sparc.iso
-rwxrwSrwt 1 root root 473M Feb 27 08:06 ubuntu-7.10-server-sparc.iso
-rwxrwSrwt 1 root root 101M Feb 15 11:53 VMware-server-1.0.4-56528.i386.rpm
-rwxrwSrwt 1 root root 147M Dec 26 13:21 VMware-server-installer-1.0.4-56528.exe

  • Using smbmount to mount a Windows shared folder. Deprecated in RHEL5 (no more smbfs, cifs available) and available for up to RHEL4

root@linux:/ # smbmount //<hostname>/<share> <mount point on Linux> -o username=<username>

root@linux:/ # smbmount //SERVERCORE/F$ /mnt/temp -o username=nimda/WINLAB
Password:

root@linux:/ # cd /mnt/temp
root@linux:/ # ls -lh
total 27G
drwxrwxrwx 1 root root 0 Jan 31 08:52 Arquivos
-rwxrwSrwt 1 root root 214M Feb 27 16:40 CD_sun4u_sparcv9__marTux_0.2__small_naked_demo_cd_bs512b.iso.bz2
-rwxrwSrwt 1 root root 2.3G Nov 19 16:33 CentOS-4.6-i386-binDVD.iso
-rwxrwSrwt 1 root root 3.6G Nov 24 19:31 CentOS-5.1-i386-bin-DVD.iso
-rwxrwSrwt 1 root root 5.6G Jan 15 14:47 eis-dvd.ISO
-rwxrwSrwt 1 root root 3.2G Nov 2 14:05 Fedora-8-i386-DVD.iso
-rwxrwSrwt 1 root root 647M Feb 14 07:22 in-preview2.iso
-rwxrwSrwt 1 root root 630M Nov 1 01:52 in-preview.iso
-rwxrwSrwt 1 root root 1.4G Feb 11 08:37 n1sm-1.3.3-ga-linux-x86.iso
-rwxrwSrwt 1 root root 251M Feb 15 12:07 oracle-xe-univ-10.2.0.1-1.0.i386.rpm
-rwxrwSrwt 1 root root 2.2G Feb 12 10:37 RHEL4.6-i386-AS-DVD.iso
-rwxrwSrwt 1 root root 3.4G Jan 21 14:03 sol-nv-b70b-x86-dvd.iso
-rwxrwSrwt 1 root root 932M Feb 6 13:50 SunSXDE108-1.zip
-rwxrwSrwt 1 root root 1.3G Feb 6 13:07 SunSXDE108-2.zip
-rwxrwSrwt 1 root root 338M Jun 28 2007 sxrt5.0x64_x86_5.0x64a.dvd2.tar.gz
-rwxrwSrwt 1 root root 163M Jan 6 14:46 systemrescuecd-x86-0.4.2.iso
-rwxrwSrwt 1 root root 394M Feb 28 09:15 ubuntu-6.06.2-server-sparc.iso
-rwxrwSrwt 1 root root 473M Feb 27 08:06 ubuntu-7.10-server-sparc.iso
-rwxrwSrwt 1 root root 101M Feb 15 11:53 VMware-server-1.0.4-56528.i386.rpm
-rwxrwSrwt 1 root root 147M Dec 26 13:21 VMware-server-installer-1.0.4-56528.exe

%d bloggers like this: