PDA

View Full Version : Cannot connect to Samba shares after Fedora 27 install



gmach24
6th December 2017, 08:08 PM
I debated whether to create a new post because of the recent one titled "Unable to mount SMB shares after system-upgrade to F27 from F26".

Since my problem is with a new Fedora 27 install I'm creating a new post.

I've been using Debian and its offshoots. But I'm back with Fedora 27 for this desktop.

Cannot see any Samba shares on other computers - Windows or Linux.

I've tried various configurations to the /etc/samba/smb.conf and although no errors were reported when running testparm I cannot, as I said, connect or see other Samba shares.

Under "Files>Other Locations" I can see a Windows Network icon but clicking it just leads to a screen which is blank except for the words "Folder Is Empty".

I've followed instructions from https://docs.fedoraproject.org/f27/system-administrators-guide/servers/File_and_Print_Servers.html

I can connect to a Samba share on a media server running Debian via this command taken from the above page:



$ smbclient //hostname/sharename -U username


This also works works:



smbclient -L 192.168.1.149


192.168.1.149 obviously being the local network IP address of the computer with the Samba shares.

I can also connect via:



$ smbclient -L sharename


I tried to mount the share on the Fedora 27 desktop using:



mount -v -t cifs //servername/sharename /mnt/point/ -o username=username,password=password




But this failed with the error message:

mount.cifs kernel mount options: ip=198.105.244.74,unc=\\username\sharename,user=us ername,pass=********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Sometimes "mount error(13)" occurred.

I checked to make sure the cifs-utils package is installed and searched for the above error messages but did not find anything to resolve the problem

Sorry this is so long.

gjaltemba
7th December 2017, 06:02 PM
I just tried this on my newly installed f27 and it works as expected. Your test of smbclient is to 192.168.1.149 while the mount is to 198.105.244.74

What is the output of
smbclient -L 198.105.244.74

BTW smbclient -L sharename is probably a typo

gmach24
7th December 2017, 07:19 PM
Man - I just typed in an entire message and then clicked the wrong thing and everything disappeared. Once again:

Thanks for your reply.

Output of

$smbclient -L 198.105.244.74

is

Connection to 198.105.244.74 failed (Error NT_STATUS_IO_TIMEOUT)

No computer/device on my network has the 198.105.244.74 address. An Internet search shows this address, at least at one time, was located in Boulder, Colorado. I think there is something fundamental here I'm not understanding.

Also, running

$smbclient -L sharename


lists all the shares on the sharename computer and I can use the hostname - i.e. I don't have to use the local IP address where it says "sharename".

Hope I don't delete this one before it posts.

Thanks again.

gjaltemba
7th December 2017, 08:25 PM
Your use of notation is inconsistent and confusing to me. sharename represents different things in the following 2 examples.
smbclient -L sharename
mount -v -t cifs //servername/sharename /mnt/point/ -o username=username,password=password

The error message of your mount example in the top post refers to a servername on the internet.

glennzo
7th December 2017, 09:23 PM
mount -v -t cifs //servername/sharename /mnt/point/ -o vers=2.0,username=username,password=password

Try adding vers=2.0 to the command line.

gmach24
7th December 2017, 09:56 PM
Hi. Thanks for your quick reply.

You're right - it should have been

smbclient -L servername

My apologies.

As far as the second problem - attempting to mount a Samba share on the local Fedora file system - I know it throws back an IP address from the Internet - I wrote that in my previous post. I traced it to Boulder, Colorado. How/why/where that IP address comes from I have no idea.

That IP address occurs in the error message from this command:

mount -v -t cifs //servername/sharename /mnt/point/ -o username=username,password=password

when using the actual servername in //servername/sharename

However, running the same command to mount the remote share using the IP address of the remote server I get:

mount.cifs kernel mount options: ip=192.168.1.149,unc=\\192.168.1.149\sharename,use r=username,pass=********

and the remote sharename folder is mounted on the Fedora Desktop – and as you can see the local network address is 192.168.1.149

To double check I again ran

mount -v -t cifs //servername/sharename /mnt/point/ -o username=username,password=password

using the server name instead of network address and got the same error message:

mount.cifs kernel mount options: ip=198.105.244.74,unc=\\servername\sharename,user= username,pass=********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Same error as before.

I'm trying to figure out where this address 198.105.244.74 comes from - it is not in the Fedora Desktop's /etc/samba/smb.conf file. It is not in the smb.conf on the remote server. I’m stumped.

The only other thing I can think of is I can only SSH to the remote server using its local network address (192.168.1.149). I have always been able to resolve this with other computers and Linux installs and I keep looking for the answer.

It seems I did something wrong somewhere. I just don't know where.

gmach24
7th December 2017, 10:20 PM
Hi. Thank you for the suggestion. I ran

sudo mount -v -t cifs //servername/sharename /mnt/point/ -o vers=2.0,username=username,password=password

and got the same error:

mount.cifs kernel mount options: ip=198.105.244.74,unc=\\servername\sharename,vers= 2.0,user=username,pass=********

Thanks anyway.

gjaltemba
8th December 2017, 02:12 AM
Sounds like netbios name resolution is not working. I would suggest that you check smb.conf, nsswitch.conf, wins server, master browser

what is the output of
systemctl status nmb.service

gmach24
8th December 2017, 02:24 AM
Sounds like netbios name resolution is not working. I would suggest that you check smb.conf, nsswitch.conf, wins server, master browser

what is the output of
systemctl status nmb.service

$systemctl status nmb.service

● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; disabled; vendor preset:
Active: inactive (dead)
lines 1-3/3 (END)

$systemctl status smb.service

● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset:
Active: inactive (dead)

$smbtree -d3

user@localhost etc]$ sudo smbtree -d3 | more
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
added interface enp2s0 ip=192.168.1.104 bcast=192.168.1.255 netmask=255.255.255.0
Connecting to 192.168.1.149 at port 445
got OID=1.3.6.1.4.1.311.2.2.10
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=0x62008215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008215
SPNEGO login failed: The attempted logon is invalid. This is either due to a bad username or authentication information.

In the same output is this:

name_resolve_bcast: Attempting broadcast lookup for name SERVERNAME<0x20>
\\SERVERNAME Samba 4.3.11-Ubuntu
Got a positive name query response from 192.168.1.149 ( 192.168.1.149 )
Connecting to 192.168.1.149 at port 445
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=0x62008215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008215
SPNEGO login failed: The attempted logon is invalid. This is either due to a bad username or authentication information.



There is more to the smbtree output but it seems there is, according to the file, a bad username or authentication information. The servername seems to be resolved successfully to the server at 192.168.1.149 - but again bad username or auth info. I'm not sure where that username and auth info are stored.

I'm not sure where to go from here and I don't want to post a bunch of stuff that is not helpful.



I'm researching the above output - but I have, at the moment, no idea what it means.

flyingdutchman
9th December 2017, 05:31 PM
My tuppence worth:

You should debug the problem with smbclient.

The error codes will tell you *exactly* what is wrong - but you need to think about them carefully since they are very terse.

gmach24
11th December 2017, 05:18 AM
Thanks. For the moment I wrote a script to mount the shares. I will look into debugging.

I was able to start smb and nmb manually - so at least there's that. Still would not connect and mount the shares.

Thanks again.

glennzo
11th December 2017, 12:51 PM
After reading this complete thread it's not really clear what you're trying to connect to or from where.

I have a Buffalo NAS that I connect to using Samba. On the computer I'm using this very moment, smb and nmb are running.


gjohnson@kde27=> systemctl status smb
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-12-11 06:12:47 EST; 14min ago
Main PID: 1162 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 4 (limit: 4915)
CGroup: /system.slice/smb.service
├─1162 /usr/sbin/smbd
├─1163 /usr/sbin/smbd
├─1164 /usr/sbin/smbd
└─1166 /usr/sbin/smbd

Dec 11 06:12:46 kde27 systemd[1]: Starting Samba SMB Daemon...
Dec 11 06:12:46 kde27 systemd[1]: smb.service: Supervising process 1162 which is not our child. We'll most likely n
Dec 11 06:12:47 kde27 systemd[1]: Started Samba SMB Daemon.
Dec 11 06:12:47 kde27 smbd[1162]: [2017/12/11 06:12:47.273496, 0] ../lib/util/become_daemon.c:124(daemon_ready)
Dec 11 06:12:47 kde27 smbd[1162]: STATUS=daemon 'smbd' finished starting up and ready to serve connections

gjohnson@kde27=> systemctl status nmb
● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-12-11 06:12:46 EST; 14min ago
Main PID: 887 (nmbd)
Status: "nmbd: ready to serve connections..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/nmb.service
└─887 /usr/sbin/nmbd

Dec 11 06:12:16 kde27 nmbd[887]: STATUS=daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting
Dec 11 06:12:46 kde27 nmbd[887]: [2017/12/11 06:12:46.342304, 0] ../lib/util/become_daemon.c:124(daemon_ready)
Dec 11 06:12:46 kde27 systemd[1]: Started Samba NMB Daemon.
Dec 11 06:12:46 kde27 nmbd[887]: STATUS=daemon 'nmbd' finished starting up and ready to serve connections
Dec 11 06:13:09 kde27 nmbd[887]: [2017/12/11 06:13:09.368966, 0] ../source3/nmbd/nmbd_become_lmb.c:397(become_loca
Dec 11 06:13:09 kde27 nmbd[887]: *****
Dec 11 06:13:09 kde27 nmbd[887]:
Dec 11 06:13:09 kde27 nmbd[887]: Samba name server KDE27 is now a local master browser for workgroup SAMBA on sub
Dec 11 06:13:09 kde27 nmbd[887]:
Dec 11 06:13:09 kde27 nmbd[887]: *****

You need to start and enable these services so that they both will start upon every reboot.


systemctl start smb
systemctl enable smb
systemctl start nmb
systemctl enable nmb


Here's my smb.conf, for what its worth. I don't remember making any changes to this file


gjohnson@kde27=> cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

[global]
workgroup = SAMBA
security = user
passdb backend = tbdsam
cups options = raw
printing = cups
printcap name = cups
load printers = yes
cups options = raw

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775


The NAS is plugged directly into my Comcast router with an Ethernet cable. The NAS's IP address is 10.0.0.31.

To connect to my NAS I have the following line in /etc/fstab


//10.0.0.31/share /mnt/buffalo cifs noauto,vers=2.0,user=xxxxxx,password=xxxxxx 0 0

Notice the noauto. I don't want this to connect at boot time because there will likely be a long delay. Additionally, I don't normally need access to the NAS from here. Instead, when I want to access the NAS I manually mount it from the command line.


mount /mnt/buffalo


I also connect in the same way from my server to the NAS, but I use auto instead of noauto. This server runs 11 backup scripts on a daily basis and works very reliably.

I don't know if this post will be of any help. Maybe I just don't understand your circumstances. Maybe I'm spot on. Either way, I hope there is something here you can use.

gmach24
12th December 2017, 01:37 AM
After reading this complete thread it's not really clear what you're trying to connect to or from where.


I am attempting to use Samba to connect from a desktop upon which I recently installed Fedora 27 (it dual boots with Windows 7 FWIW) to the Samba shares on a media server running Linux Mint. That's it.

[I added some history at the bottom about what I've been able to connect to this server, via Samba.]

Here is output after rebooting the Fedora 27 desktop:

# systemctl status smb
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-12-11 19:06:21 EST; 1min 12s ago
Main PID: 3277 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 4 (limit: 4915)
CGroup: /system.slice/smb.service
├─3277 /usr/sbin/smbd
├─3278 /usr/sbin/smbd
├─3279 /usr/sbin/smbd
└─3280 /usr/sbin/smbd

Dec 11 19:06:21 localhost.localdomain systemd[1]: Starting Samba SMB Daemon...
Dec 11 19:06:21 localhost.localdomain systemd[1]: smb.service: Supervising process 3277 which is not our ch
Dec 11 19:06:21 localhost.localdomain smbd[3277]: [2017/12/11 19:06:21.884341, 0] ../lib/util/become_daemo
Dec 11 19:06:21 localhost.localdomain systemd[1]: Started Samba SMB Daemon.
Dec 11 19:06:21 localhost.localdomain smbd[3277]: STATUS=daemon 'smbd' finished starting up and ready to
lines 1-17/17 (END)

and

● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-12-11 19:06:27 EST; 4min 31s ago
Main PID: 3292 (nmbd)
Status: "nmbd: ready to serve connections..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/nmb.service
└─3292 /usr/sbin/nmbd

Dec 11 19:06:27 localhost.localdomain systemd[1]: Stopped Samba NMB Daemon.
Dec 11 19:06:27 localhost.localdomain systemd[1]: Stopping Samba NMB Daemon...
Dec 11 19:06:27 localhost.localdomain systemd[1]: Starting Samba NMB Daemon...
Dec 11 19:06:27 localhost.localdomain systemd[1]: nmb.service: Supervising process 3292 which is not our ch
Dec 11 19:06:27 localhost.localdomain nmbd[3292]: [2017/12/11 19:06:27.989856, 0] ../lib/util/become_daemo
Dec 11 19:06:27 localhost.localdomain systemd[1]: Started Samba NMB Daemon.
Dec 11 19:06:27 localhost.localdomain nmbd[3292]: STATUS=daemon 'nmbd' finished starting up and ready to
lines 1-16/16 (END)

I can mount the Samba shares from the media server to the Fedora 27 desktop using the command line or via a line in /etc/fstab. Both worked. I wrote a script to mount the shares in lieu of connecting automatically.

I ran testparm on smb.conf - numerous times. It's all been a variation of:

# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

----

I know more information is available from different commands. But this already may be too much information.

Thanks for your time and help.


----

Below is a little history of what has worked and is still working:

Hi. I want to connect to folders/files on a media server that currently runs Linux Mint. (Before Mint this server ran a headless Debian server install; before that, a headless Ubuntu server). There are four or five Samba shares on this server, depending on what I'm doing.

Until now every desktop and laptop on my local network has connected to every Samba share on that media server - whether the server ran Mint, Debian or Ubuntu. This includes three desktops running various versions of Windows; five dual boot laptops running Windows and various versions of Linux; and a dual boot desktop initially running Windows Vista and now Windows 7 and Linux Mint or Debian (when I say "or" I mean at one time it ran Windows/Mint and later Windows/Debian.

I can also connect to the Samba media server shares when I boot to Windows 7 using the computer upon which I installed Fedora 27.

I also have three Android tablets that connect to the Samba shares on the media server.

All of these are connected, working, sharing, etc. as I write this.

glennzo
12th December 2017, 11:26 AM
Just a thought. Open a terminal on the client machine and run journalctl -f. Watch the output of the command in the terminal while you try to connect to the samba share using your preferred method. See i f there is any interesting output from journalctl that relates to samba.

gmach24
12th December 2017, 07:52 PM
Hi. Again, thanks for your time and help.

I'm not sure how this happened, but:

I am now able to connect to the Samba shares on the media server by doing:

Files>Other Locations>

And then typing in smb://mediaservername/

in the "Connect to Server" window.

Previously I have not been able to do this even if I typed in the local ip address of the mediaserver instead of its host name.

Once I click "connect" (or press "enter") I get a list of all the shares on the media server. I need sign in only once.

Not sure what changed - but I am also able to sign in via ssh to the media server using its hostname instead of its local ip address. Previously I had to sign in like so

#ssh username@xxx.xxx.x.xxx

where the xs are the local ip address.

Prior to all this I did as you suggested. Ran

#run journalctl -f

but the output is so far over my head. I will retry this after I'm sure the Samba connection persists after reboots, etc.

Again, thanks for your time and knowledge.

gmach24
19th December 2017, 10:17 PM
Hi. So, I am done with this subject. I don't know if it can be marked "solved" as I still cannot connect to the Samba media server via Activities>Files>Other Locations>Windows Network but can via Activities>Files>Other Locations>Connect To Server>smb://servername/

The last things I did to double check were:

1. Make certain /etc/hostname was the name I wanted for the Fedora 27 desktop; and that this name matched the 'net bios' name in /etc/samba/smb.conf.

2. Make certain /etc/hosts had a line with the server local IP address and name:

xxx.xxx.x.xxx servername

3. Make certain all information in /etc/samba/smb.conf was correct and that

$testparm /etc/samba/smb.conf

did not yield errors.

Thanks to people who gave their time and knowledge. If I figure out the final "how to" for this I will post it.

richengland
16th January 2018, 06:49 AM
I have encountered the same situation using Mate and caja as the file manager. I do not see the contents of the network, but if I enter the name of the server (smb://servername/) it connects and I can "browse" the file system thereafter.

Trav1sty
18th January 2018, 09:27 AM
Hi. So, I am done with this subject. I don't know if it can be marked "solved" as I still cannot connect to the Samba media server via Activities>Files>Other Locations>Windows Network but can via Activities>Files>Other Locations>Connect To Server>smb://servername/

The last things I did to double check were:

1. Make certain /etc/hostname was the name I wanted for the Fedora 27 desktop; and that this name matched the 'net bios' name in /etc/samba/smb.conf.

2. Make certain /etc/hosts had a line with the server local IP address and name:

xxx.xxx.x.xxx servername

3. Make certain all information in /etc/samba/smb.conf was correct and that

$testparm /etc/samba/smb.conf

did not yield errors.

Thanks to people who gave their time and knowledge. If I figure out the final "how to" for this I will post it.

The issue is with version 4.7 of Samba. They implemented a stricter security level. I had the same issue and found the fix on a Manjaro forum. Add client max protocol = NT1 to your smb.conf under the Global section and restart.