You are not logged in.

#1 2016-05-03 08:59:30

n125
Member
Registered: 2011-12-30
Posts: 38

Can no longer connect to shares after upgrading Samba to 4.4.2-1

After upgrading my Linux Samba server to 4.4.2-1, Linux and Windows clients can no longer connect to shares. The packages upgraded were

samba-4.3.6-1 to samba-4.4.2-1
smbclient-4.3.6-1 to smbclient-4.4.2-1
libwbclient-4.3.6-1 to libwbclient-4.4.2-1

From a Linux client, if I try manually mounting a share with the following command,

sudo mount -t cifs //server/sharename /mount/point -o credentials=whatever

I get the following error:

mount error(11): Resource temporarily unavailable.
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Trying to enter a share mounted in /etc/fstab returns this error:

cd /mount/point
cd: no such device: /mount/point

From a Windows client, trying to connect to a share returns a dialogue box with the following error message:

An error occurred while reconnecting W: to \\server\sharename
Microsoft Windows Network: The local device name is already in use.

This connection has not been restored.

Things I've tried:

- Rebooting everything

- Google

- testparm -s on /etc/samba/smb.conf -- no errors reported.
-- Here is my smb.conf file (it's really basic):

#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = Samba Server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   printcap name = /dev/null
;   load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
   printing = bsd

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
   max log size = 500

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = user
# Use password server option only with security = server
;   password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
;  password level = 8
;  username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
;  encrypt passwords = yes
;  smb passwd file = /etc/samba/smbpasswd

# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
#        the encrypted SMB passwords. They allow the Unix password
#        to be kept in sync with the SMB password.
;  unix password sync = Yes
;  passwd program = /usr/bin/passwd %u
;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# Unix users can map to different SMB User names
;  username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /etc/samba/smb.conf.%m

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24 
interfaces = wlan* eth* lo
bind interfaces only = no

# Configure remote browse list synchronisation here
#  request announcement to, or browse list sync from:
#	a specific host or from / to a whole subnet (see below)
;   remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
;   remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
;   local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
;   domain master = yes 

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Use only if you have an NT server on your network that has been
# configured at install time to be a primary domain controller.
;   domain controller = <NT-Domain-Controller-SMBName>

# Enable this if you want Samba to be a domain logon server for 
# Windows95 workstations. 
;   domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
# run a specific logon batch file per username
;   logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#	Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one	WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
   dns proxy = no 

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
;  preserve case = no
;  short preserve case = no
# Default case is normally upper case for all DOS files
;  default case = lower
# Be very careful with case sensitivity - it can break things!
;  case sensitive = no

;socket options = IPTOS_THROUGHPUT SO_KEEPALIVE TCP_CORK
;use sendfile = true

#============================ Share Definitions ==============================
;[homes]
;   comment = Home Directories
;   browseable = no
;   writable = yes

# /home
[home]
   path = /home/username
   valid users = username
   public = no
   writable = yes
   printable = no
   hide unreadable = yes

# Private access to partition 1
[Partition 1]
    path = /media/partition_1
    valid users = username
    public = no
    writable = yes
    printable = no        
    hide unreadable = yes

# Private access to partition 2
[Partition 2]
    path = /media/partition_2
    valid users = username
    public = no
    browseable = no
    writable = yes
    printable = no
    hide unreadable = yes

If I downgrade the three packages mentioned at the top back to 4.3.6-1 and restart the server, everything immediately works again.

So I'm at a loss. Any ideas?

Last edited by n125 (2016-05-03 09:00:08)

Offline

#2 2016-05-16 08:22:02

Vizitor
Member
Registered: 2015-01-05
Posts: 81

Re: Can no longer connect to shares after upgrading Samba to 4.4.2-1

I had similar (I'm using client only) problem, as described here.
Edit
Ooops, too late, I spotted You already made a downgrade.

Last edited by Vizitor (2016-05-16 08:33:03)

Offline

#3 2016-05-16 20:10:20

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 288

Re: Can no longer connect to shares after upgrading Samba to 4.4.2-1

n125 wrote:

After upgrading my Linux Samba server to 4.4.2-1, Linux and Windows clients can no longer connect to shares.... So I'm at a loss. Any ideas?

Did you review pacman.log to see if anything needs to be corrected in the samba upgrade?
EDIT: nothing in pacman.log. Unable to roll back Samba because smbd and nmbd.service won't re-enable and restart (there is a ton of dependency breakage mainly due to smbclient) I did pacman -Rc smbclient and then re-installed Samba (roll back to 4.3.6.1) and rolled libwbclient and smbclient back to their previous versions but no resolve (the services won't re-enable restart).
Researched these sites and tried changing SMB protocols on a W10 machine that used to connect to samba shares on this Arch pc:
https://lists.samba.org/archive/samba/2 … 93886.html,
https://support.microsoft.com/en-us/kb/2696547,
http://forums.fedoraforum.org/showthread.php?t=286263,
https://techjourney.net/cannot-connect- … indows-10/,
http://www.tenforums.com/network-sharin … twork.html,
https://bugs.archlinux.org/task/48987
and as the bug report mentions, it's on samba side. On the W10 machine I don't get a popup to log on, but get an error that it can't connect with an error code. After trying the SMB protocol changes the Arch pc stopped showing up altogether in the Network on the W10 machine. On the Arch machine I get the "unable to access Windows Network" popup so can't see any of the Win machines on home network. Also have a Google TV (linux OS) that can no longer access samba shares but sees them, and it too doesn't prompt for username and password. Haven't tried XP or W7 machine access to Samba shares yet.

Last edited by WFV (2016-05-20 16:54:54)


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#4 2016-05-20 22:08:35

n125
Member
Registered: 2011-12-30
Posts: 38

Re: Can no longer connect to shares after upgrading Samba to 4.4.2-1

Nope; nothing in pacman.log.

Since I made this thread, 4.4.3-1 was released for samba, smbclient, and libwbclient. The issue still persists in this new version. I also tried replacing my server's smb.conf with the one suggested in the wiki to make sure I haven't made any mistakes in mine, and no luck.

There are no firewalls or anything that could be messing with traffic to my knowledge. But just to rule that out, when I have the time I'm going to try installing Arch on a spare laptop and setting up a Samba server on that to see if the problem exists on a fresh install.

To a mod who sees this: Could you please move this thread to the Networking, Server, and Protection sub-forum?

Offline

#5 2016-05-21 18:41:35

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 288

Re: Can no longer connect to shares after upgrading Samba to 4.4.2-1

I re-installed everything back to current (all the smbclient dependencies, there were many, devede, k3b, soundconverter, etherape,,, to name a few of the packages), removed the line "spnego=no" from the Global settings in smb.conf (one of the links above mentioned to add it), testparm -I never err'd before or after that change. Restarted nmbd and smbd services. I installed python-notify2 from the AUR (for a completely different seemingly unrelated reason, troubleshooting hplip stuff). Other things I did today was add "wins" in the hosts line in nsswitch.conf (which might also be unrelated), and

chown -R bill:sambashare /var/lib/samba/usershares/bill

, which just produces a different error in journalctl. On the W10 pc i reset the SMB1 and SMB2 protocols back to enabled (via powershell (admin) and/or regedit). Booted up a W7pro64bit machine and was able to map to samba shares without any problem, the W10 pc is pro64 bit also. Booted it up and its connecting now as well. The only thing I didn't revert on the W10 pc was a key I added in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters, the new key is a DWORD (32bit) named "AllowInsecureGuestAuth", hex = 1 from one of the links above. So all is working today with Samba 4.4.3.1, including ES File Explorer on the android Google TV. The Arch pc hasn't been rebooted, the W10, W7, and Google TV's have. The Arch pc slept last night.... The network (router and two switches) haven't been rebooted either. Samba sees and connects to the window pc's and vs vsa, the Google TV's don't have any shares but connect to the Samba stuff.
smb.conf =

[global]

  usershare path = /var/lib/samba/usershares
  usershare max shares = 10
  usershare allow guests = yes
  usershare owner only = False
  workgroup = HOMEGROUP
  server string = Samba Server
    create mask = 0664 
    directory mask = 0775 
    force create mode = 0664 
    force directory mode = 0775 
   printcap name = /etc/printcap
   load printers = yes
   log file = /var/log/samba/%m.log
   max log size = 1000
   local master = no
   preferred master = yes
 name resolve order = host wins bcast
   wins support = yes
   dns proxy = no 
 bind interfaces only = yes
 interfaces = lo eth0 enp4s0

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = no
   writable = no
   printable = yes

[Arch Documents] 
    path = /home/bill/Documents 
    read only = No 
    guest ok = yes 
    veto files = /.*/

[Arch Music] 
    path = /home/bill/Music 
    read only = No 
    guest ok = yes 
    veto files = /.*/

[Arch Pictures] 
    path = /home/bill/Pictures 
    read only = No 
    guest ok = yes 
    veto files = /.*/

[Arch Videos] 
    path = /home/bill/Videos 
    read only = No 
    guest ok = yes 
    veto files = /.*/

[Arch Downloads] 
    path = /home/bill/Downloads 
    read only = No 
    guest ok = yes 
    veto files = /.*/

[Arch ISO]
    path = /home/bill/ISO
    read only = No
    guest ok = yes

Last edited by WFV (2016-05-21 23:27:52)


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#6 2016-05-22 05:39:37

n125
Member
Registered: 2011-12-30
Posts: 38

Re: Can no longer connect to shares after upgrading Samba to 4.4.2-1

Okay, so I went ahead and installed Arch Linux on a spare laptop to see if this problem happens on a fresh install. It does; but, I've been able to make some observations which might be helpful.

The test machine is running version 4.4.3-1 of samba, smbclient, and libwbclient. It has two shares, share1 and share2. Guest access is disabled and there is only one user registered with the Samba server. The services enabled are smbd.socket and nmbd.service. The smb.conf file is more or less the same as the one used by my actual Samba server. I tried connecting to these test shares from two computers: one running Arch Linux and the other running Windows Vista.

So in general, it seems like I cannot connect to more than one share at a time, across all computers.

  • The Linux computer can only connect to one share at a time. Period. If I try connecting to share2 after I've connected to share1, and vice versa, I'll get the same error as described in my OP: mount error(11): Resource temporarily unavailable.

    • If the Windows computer is already connected to a share, the Linux computer won't be able to connect to either share.

  • The Windows computer can actually connect to share1 and share2 at the same time.

    • If the Linux computer is already connected to a share, the Windows computer won't be able to connect to either share.

Going back to my actual Samba server, these observations seem to hold. It seems like something implemented after 4.3.6-1 is preventing me from being able to connect to multiple shares at the same time. It almost seems like a deliberate change, and makes me wonder if there's a setting I can add to smb.conf to change it back to how it was.

Last edited by n125 (2016-05-22 09:26:15)

Offline

#7 2016-05-22 17:18:39

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 288

Re: Can no longer connect to shares after upgrading Samba to 4.4.2-1

Ok Samba is up and down here.
Maybe some useful information here. I deleted an empty folder in /var/lib/samba/usershares that acc'd to the link gets created if samba shares are activated via gui in folder/file permissions (guilty as charged), removed interface eth0 from smb.conf (think it was left over from an old pc originally set up samba on, but hadn't caused any problems for 3 years), ran testparm, restarted nmbd, smbd, and winbindd and samba is working, for now -- it might change tomorrow? I see this error often in journalctl

May 29 20:06:24 arch-bill gvfsd[1001]: ** (process:5132): WARNING **: Couldn't create directory monitor on smb://x-gnome-default-workgroup/. Error: The specified location is not mounted

gnome pita

Last edited by WFV (2016-05-30 04:36:04)


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

Board footer

Powered by FluxBB