LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-21-2018, 12:54 PM   #1
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Rep: Reputation: Disabled
CentOS 7 to Windows, can list smb shares but cannot mount


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:
smbclient -L <IP> -U Administrator
I get this:

Code:
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:
mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator
It returns this:

Code:
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/quest...e-or-directory

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

I tried this:

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

Code:
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!
 
Old 06-22-2018, 06:18 AM   #2
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
Code:
mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator,vers=2.0
mount -v -t cifs //<IP>/MyShare /mnt -o username=Administrator,sec=ntlmv2
Syntax errors are likely for the leading space after the comma. I see this, where they have tested with a windows client, so might be worth a look.

FWIW, add more verbosity/debug level to your smbclient command above, by adding a '-d3' and paste the output.

Edit 1: Also found this. You may need to enable Netbios over tcp for your windows client.

Edit 2: Missed that you were running 'smbclient' on a linux system. Is it same machine as the Samba server ? Have you rechecked your selinux settings [context type = generally samba_share_t, couple booleans etc] and Firewall [firewall-cmd --permanent --list-services] ?

Last edited by Honest Abe; 06-22-2018 at 08:03 AM.
 
Old 06-22-2018, 10:38 AM   #3
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
Whipped up a test share in my lab -

1. Server - CentOS 7.5 running 3.10.0-862.3.2
2. Client - Windows 10 Home (14393.2125)

I can access the share from client (though can't write, will look at that !). Follow the link I provided earlier, I used mostly same techniques.. (there are only so many ways you can install package and edit the config file after all. )
 
Old 06-22-2018, 10:58 AM   #4
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thanks for the reply.

Quote:
Syntax errors are likely for the leading space after the comma
Code:
# mount -v -t cifs ///MyShare /mnt -o username=Administrator,vers=2.0

mount.cifs kernel mount options: ip=10.242.34.103,unc=\\10.242.34.103\MyShare,vers=2.0,user=Administrator,pass=********
mount error(2): No such file or directoryRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Quote:
FWIW, add more verbosity/debug level to your smbclient command above, by adding a '-d3' and paste the output
Code:
smbclient -d3 -L 10.242.34.103 -U Administrator
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
added interface virbr0 ip=192.168.122.1 bcast=192.168.122.255 netmask=255.255.255.0
added interface enp0s3 ip=10.0.2.15 bcast=10.0.2.255 netmask=255.255.255.0
added interface enp0s8 ip=10.242.34.100 bcast=10.242.34.255 netmask=255.255.255.0
Client started (version 4.7.1).
Connecting to 10.242.34.103 at port 445
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.3.6.1.4.1.311.2.2.10
Enter SAMBA\Administrator's password: 
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
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
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

	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.
Connecting to 10.242.34.103 at port 139
Connecting to 10.242.34.103 at port 139
Connection to 10.242.34.103 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available
Quote:
you may need to enable Netbios over tcp for your windows client.
Did that. No change unfortunately.

Quote:
Missed that you were running 'smbclient' on a linux system. Is it same machine as the Samba server ?
I'm connecting, or trying to, from a CentOS 7 workstation to a W2K8 R2 Server. There is no samba server anyhwere.

smbclient should enumerate Windows shares with a server -- and it does list them all, before it throws that last error.

I should also be able to mount -cifs from linux to a Windows share without a server too. I originally thought this was a permissions problem. So on the Windows side, I opened up the share to the Everyone group. Then after reading the man page, it looked like a smb version problem. That's why I specified vers=2.0 as an argument.

Thanks for all your help thus far!
 
Old 06-22-2018, 10:59 AM   #5
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
++ my Outputs -

smbclient ran from the samba server -
Code:
[root@ab-CentOS7 ~]# smbclient -L <MyIP> -U admin -d3
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
added interface wlp4s0 ip=<MyIP> bcast=<MyBroadcast> netmask=255.255.255.0
added interface virbr0 ip=<MyBr> bcast=<MyBrBcast> netmask=255.255.255.0
Client started (version 4.7.1).
Connecting to <MyIP> at port 445
got OID=1.3.6.1.4.1.311.2.2.10
Enter SAMBA\admin's password: 
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
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
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

	Sharename       Type      Comment
	---------       ----      -------
	print$          Disk      Printer Drivers
	testsamba       Disk      sharing /testsamba
	IPC$            IPC       IPC Service (Samba 4.7.1)
	admin           Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.
Connecting to <MyIP> at port 139
got OID=1.3.6.1.4.1.311.2.2.10
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
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

	Server               Comment
	---------            -------

	Workgroup            Master
	---------            -------
	SAMBA                AB-CENTOS7
	WORKGROUP            MANOSMITA-PC
Samba config -

Code:
[root@ab-CentOS7 ~]# tail -6 /etc/samba/smb.conf
[testsamba]
	comment = sharing /testsamba
	path = /testsamba
	browsable = yes
	write list = admin
Selinux & firewall -

Code:
[root@ab-CentOS7 ~]# ls -ldZ /testsamba
drwxr-xr-x. root root unconfined_u:object_r:samba_share_t:s0 /testsamba
[root@ab-CentOS7 ~]# firewall-cmd --permanent --list-services 
dhcpv6-client ssh smtp samba
 
Old 06-22-2018, 11:01 AM   #6
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Honest Abe View Post
Whipped up a test share in my lab -

2. Client - Windows 10 Home (14393.2125)
Try it with W2K8 R2. I don't have a problem with Windows 10 either. Or W2K12, or W2k16.
 
Old 06-22-2018, 11:06 AM   #7
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by mgoblue0970 View Post
Thanks for the reply.
~~
I'm connecting, or trying to, from a CentOS 7 workstation to a W2K8 R2 Server. There is no samba server anyhwere.

smbclient should enumerate Windows shares with a server -- and it does list them all, before it throws that last error.

I should also be able to mount -cifs from linux to a Windows share without a server too. I originally thought this was a permissions problem. So on the Windows side, I opened up the share to the Everyone group. Then after reading the man page, it looked like a smb version problem. That's why I specified vers=2.0 as an argument.

Thanks for all your help thus far!
Do u have these packages installed on ur CentOS server ?
See mine below -
Code:
[root@ab-CentOS7 ~]# yum list installed samba*
Loaded plugins: fastestmirror, langpacks
Repository google-chrome is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.fibergrid.in
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.fibergrid.in
 * nux-dextop: mirror.li.nux.ro
 * updates: mirrors.fibergrid.in
Installed Packages
samba.x86_64                                                                   4.7.1-6.el7                                                       @base
samba-client.x86_64                                                            4.7.1-6.el7                                                       @base
samba-client-libs.x86_64                                                       4.7.1-6.el7                                                       @base
samba-common.noarch                                                            4.7.1-6.el7                                                       @base
samba-common-libs.x86_64                                                       4.7.1-6.el7                                                       @base
samba-common-tools.x86_64                                                      4.7.1-6.el7                                                       @base
samba-libs.x86_64                                                              4.7.1-6.el7                                                       @base
Do you have these services running ?
If yes,congrats.. you have a samba server running.
Code:
# systemctl status smb nmb
Also, what's your /etc/samba/smb.conf ? What's the configuration for [Myshare] ?
 
Old 06-22-2018, 11:12 AM   #8
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by mgoblue0970 View Post
Try it with W2K8 R2. I don't have a problem with Windows 10 either. Or W2K12, or W2k16.
Don't have one. If you are certain that the behaviour is specific with W2k8 R2, try at windows help forums. It would mean that the linux part is working fine, and that is as far as I go.
 
Old 06-22-2018, 11:17 AM   #9
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
try at windows help forums.
"Windows help"... ha ha ha ha ha ha ha baw wah ha ha ha ha ha... technet/social forums, whatever MS is calling it now, is a hot mess.

Quote:
It would mean that the linux part is working fine
That's what I'm thinking too. Thanks for the help.
 
Old 06-22-2018, 11:22 AM   #10
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by mgoblue0970 View Post
"Windows help"... ha ha ha ha ha ha ha baw wah ha ha ha ha ha... technet/social forums, whatever MS is calling it now, is a hot mess.
Ever heard of superuser(dot)com ?

All the best ! If you do figure it out eventually, come back and post the solution here.
 
Old 06-22-2018, 12:19 PM   #11
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Ever heard of superuser(dot)com ?
Yeah.. the "stack" family of sites is my go to. I have a question out there now on the topic. It's gone unanswered for a few days (and that's why I came here).

Thanks again. cheers! U+1F37A
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
list smb shares JJJCR Linux - Newbie 2 09-26-2013 10:40 PM
[SOLVED] Unable to mount Windows 2003 shares from CentOS Leupi73 Linux - Software 1 01-17-2013 02:58 AM
[SOLVED] SMB Shares dont work when SMB is run as a service! CentOS 6 finnsloss Linux - Networking 1 10-14-2011 09:33 AM
Windows users suddenly unable to mount smb shares brojard28 Linux - Server 5 12-04-2008 04:54 PM
SMB won't mount Windows Server Shares galliar Linux - Networking 1 05-11-2005 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration