CentOS 7 to Windows, can list smb shares but cannot mount

General support questions
mgoblue0970
Posts: 37
Joined: 2013/01/02 03:39:20

CentOS 7 to Windows, can list smb shares but cannot mount

Post by mgoblue0970 » 2018/06/21 17:07:37

This is a really weird one and all the research I've done so far isn't panning out.

I'm trying to connect to a Windows share from CentOS 7.5.1804 to Windows Server 2008 R2 (no snickering and let's stay on topic please).

Details about the W2K8 server:

* has not been promoted to a domain controller
* resides on a flat network
* Everyone group has read/write to the share (I changed this for troubleshooting)
* the share is named MyShare

When I run this command from Linux:

Code: Select all

smbclient -L <IP> -U Administrator
I get this:

Code: Select all

Sharename       Type      Comment
---------       ----      -------
ADMIN$          Disk      Remote Admin
C$              Disk      Default share
IPC$            IPC       Remote IPC
MyShare         Disk      
Users           Disk      
Reconnecting with SMB1 for workgroup listing.
Connection to <IP> failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available
Weird. It throws an error but still lists all the shares. Googling "NT_STATUS_RESOURCE_NAME_NOT_FOUND" hasn't yielded a lot of info.

Since the share was found, I pressed on with:

Code: Select all

mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator
It returns this:

Code: Select all

mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
So I read the man page and this:

https://unix.stackexchange.com/question ... -directory

...and started thinking I need to specify the version or ntlm level.

I tried this:

Code: Select all

mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator, vers=2.0
and

Code: Select all

mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator, sec=ntlmv2
and they both error out because of incorrect syntax... but that's what was supplied as an example on that webpage and in the man page!

Any suggestions how to get the mount command working would be greatly appreciated. Thanks!

gjaltemba
Posts: 49
Joined: 2016/11/29 15:23:25

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by gjaltemba » 2018/06/21 17:58:12

Is your Windows workstation domain SMB1? If not then try

smbclient -L <IP> -U Administrator --workgroup <windows workstation domain>

mgoblue0970
Posts: 37
Joined: 2013/01/02 03:39:20

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by mgoblue0970 » 2018/06/21 21:31:58

I'm not using SMB1... it's vulnerable to EternalBlue attacks as well.

If I run

Code: Select all

Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | ForEach-Object {Get-ItemProperty $_.pspath}
, it returns:

Code: Select all

SMB1 : 0
SMB2 : 1
In the OP I said I ran smbclient -L <IP> -U Administrator and it does list the shares.

The problem I'm having is *connecting* to the shares using the mount command. But it would be nice to know what causes the "NT_STATUS_RESOURCE_NAME_NOT_FOUND" error. Running smbclient with or without --workgroup has no bearing on a standalone server which hasn't been promoted.

gjaltemba
Posts: 49
Joined: 2016/11/29 15:23:25

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by gjaltemba » 2018/06/22 07:52:54

No space after comma works for me

mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator,vers=2.0

mgoblue0970
Posts: 37
Joined: 2013/01/02 03:39:20

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by mgoblue0970 » 2018/06/22 15:19:13

Code: Select all

mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator,vers=2.0
Password for Administrator@//<IP>/MyShare:  **********
mount.cifs kernel mount options: ip=<IP>,unc=\\<IP>\MyShare,vers=2.0,user=Administrator,pass=********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by TrevorH » 2018/06/22 15:35:25

Does /mnt exist? Is anything like autofs already configured to use /mnt? Are there any more messages in /var/log/messages at the time of the error?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

mgoblue0970
Posts: 37
Joined: 2013/01/02 03:39:20

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by mgoblue0970 » 2018/06/22 17:03:51

Does /mnt exist?

Code: Select all

ls -al /
drwxr-xr-x.   2 root root    6 Apr 11 04:59 mnt
Is anything like autofs already configured to use /mnt?
I don't think so. I ran:

Code: Select all

showmount -e localhost
and it returned:

Code: Select all

clnt_create: RPC: Program not registered
which I really don't know that means -- especially if it's some effing systemd rubbish.
Are there any more messages in /var/log/messages
I ran tail -f /var/log/messages and tried it again:

Code: Select all

Jun 22 17:02:33 localhost kernel: CIFS VFS: could not allocate crypto hmacmd5
Jun 22 17:02:33 localhost kernel: CIFS VFS: could not crypto alloc hmacmd5 rc -2
Jun 22 17:02:33 localhost kernel: CIFS VFS: Error -2 during NTLMSSP authentication

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by TrevorH » 2018/06/22 21:55:17

What is the output from uname -a ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by hunter86_bg » 2018/06/24 04:14:10

Can you try to mount with adding the

Code: Select all

sec=ntlmv2i
You can try the other 'sec' options from the mount.cifs man page.

mgoblue0970
Posts: 37
Joined: 2013/01/02 03:39:20

Re: CentOS 7 to Windows, can list smb shares but cannot mount

Post by mgoblue0970 » 2018/06/25 19:49:41

TrevorH wrote:
2018/06/22 21:55:17
What is the output from uname -a ?

Code: Select all

Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Post Reply