# Samba broke: BAD_NETWORK_NAME [solved]

## jesnow

I swear every single upgrade of Samba breaks my working configuration. This weekend I went from 4.11.11 to 4.11.13 on both client and server, and suddenly the client can no longer mount the volumes exposed on the server. 

```

bartali /home/jesnow # mount -a

mount error(2): No such file or directory

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

```

To start with, samba and mount have the most infuriatingly cryptic error messages. Would it be so hard to put " printf ("'%s': No such file or directory", *szBadFileName); " into your code? I mean for heavens sake. You don't eben know *which* file or directory out of the whole house of cards is unavailable. 

So to check, I mounted the volumes from my mac, all hunky dory. The problem is on the client side. 

Here are the equally cryptic kernel log messages. The interesting part is in my 20 years of dealing with samba, I've never seen these ones. 

```

Oct 18 18:35:01 bartali kernel: CIFS: Attempting to mount //merckx/jesnow

Oct 18 18:35:01 bartali kernel: CIFS VFS:  BAD_NETWORK_NAME: \x5c\x5cmerckx\x5cIPC$

Oct 18 18:35:01 bartali kernel: CIFS VFS: \x5c\x5cmerckx failed to connect to IPC (rc=-2)

Oct 18 18:35:01 bartali kernel: CIFS VFS:  BAD_NETWORK_NAME: \x5c\x5cmerckx\x5cjesnow

Oct 18 18:35:01 bartali kernel: CIFS VFS: session 0000000096b7181f has no tcon available for a dfs referral request

Oct 18 18:35:01 bartali kernel: CIFS VFS: cifs_mount failed w/return code = -2

```

And for reference here is the entry in fstab that once did work but now does not:

```

//merckx/jesnow         /mnt/merckx-jesnow cifs         credentials=/root/smb-merckx/.credential,vers=3.11,uid=jesnow,gid=users  0 1 

```

and the equivalent mount command:

```

bartali /home/jesnow #  mount -v //merckx/jesnow /mnt/merckx-jesnow -t cifs -o credentials=/root/smb-merckx/.credential,vers=3.11,uid=jesnow,gid=users

mount.cifs kernel mount options: ip=192.168.1.105,unc=\\merckx\jesnow,vers=3.11,uid=1001,gid=100,user=jesnow,pass=********

mount error(2): No such file or directory

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

bartali /home/jesnow # 

```

Once again, I'm mystified by what's going on, but all I can guess is samba has assumes there is an active domain to resolve names off of and since there isn't then is dead in the water.  what is \xc5? Ahwt is a tcon? What is BAD_NETWORK_NAME? I don't have a dns, i just use entries in /etc/hosts to specify ip addresses (small number of servers). Is that what's confusing it?  What is a tcon? I've never seen these terms in conjunction with samba, I assume they're new. Of course I have googled and not been enlightened. 

Many thanks in advance. 

Cheers, 

Jon.Last edited by jesnow on Mon Oct 19, 2020 2:51 pm; edited 1 time in total

----------

## jesnow

This is like the second Monday morning I've sat down at my desk, fired up my work environment, and found that samba was broken and I couldn't access any of my work data. 

In this case, I had upgraded both client and server, from 4.11.11 to 4.11.13, and rebooted the client because of a new kde plasma version (which always breaks kioslaves) but crucially had neglected to restart samba on the server. In fact, I hadn't even noticed that samba was in the update list.  

As far as I can tell the problem actually had to do with dialects of smb the samba versions were speaking to each other. Something changed between the versions. 

In any event the fix was to restart samba on the server. 

I really wish samba wouldn't be so finicky and "just work" more often. 

thanks, 

Jon.

----------

## jesnow

Same thing happened on the upgrade from 4.11 to 4.12. You must restart your samba server after an upgrade (duh, I guess). 

Jon.

----------

