Trying to access samba share returns NT_STATUS_BAD_NETWORK_NAME

I have two servers running opensuse 13.1, ftp1 and ftp2. On both I have samba running with identical smb.conf configurations. I can access my home directory share ‘/home/chapan’ on ftp1 with the command:

smbclient //ftp1/homes -U chapan

If I try to access my home directory on ftp2 with the command:

smbclient //ftp2/homes -U chapan

it returns the message:

tree connect failed: NT_STATUS_BAD_NETWORK_NAME

If I look at the /var/log/samba/log.smbd on ftp2 file I see:

[2014/01/03 10:01:38.170584, 0] …/source3/smbd/service.c:784(make_connection_s
num)
canonicalize_connect_path failed for service chapan, path /home/AD/chapan

AD is our microsoft active directory domain name. So on ftp2 samba looking for the domain name as part of the path whereas ftp1 is not. I tried copying every configuration file I could from ftp1 to ftp2 to try to make them work the same but I still get the error on ftp2. So there must be something different on ftp2, but I cannot find out what it is.

I’m also having Samba issues. I cannot see any of my shares. It took me a few hours to get Samba configured in 12.2 through the Samba Server GUI but 13.1 it just will not work. Apparmor is disabled and my firewall exceptions are all set. I’ve even turned the firewall off and still nothing. I went as far as to edit the smb.conf but that doesn’t work either. Samba and OpenSuse just do not play well together. I posted my issue yesterday and no responses yet. I’m thinking a bug maybe but who knows.

Hi chapan,

If the smb.conf is the same on both servers, the difference must be in the databases of Samba users or the servers’ configuration. I see two problems from what you described:

  1. chapan’s home path isn’t the same on both servers
  2. chapan’s home isn’t created on the fly on ftp2

The difference in chapan’s home path on ftp1 and ftp2 could be caused by a different interpretation of the Samba user chapan on ftp1 and ftp2. On one hand ftp1 believes chapan isn’t a member of AD. On the other hand ftp2 thinks that chapan is member of AD. This makes me think of two things:

  1. chapan may be a local user on ftp1, this would explain why chapan’s home exists on ftp1 but not on ftp2
  2. winbind use default domain is set to Yes on both servers

If my second thought is true, you should set winbind use default domain to No in order to avoid confusion between chapan and AD\chapan.

Even if chapan authenficated correctly to ftp2, chapan’s home wasn’t created on the fly. From Samba wiki, a solution is to add this line of code in /etc/pam.d/system-auth:


session required /lib/security/pam_mkhomedir.so

I finally figured out my issue. Not sure if this will help you but take a look at the following:

Well I finally figured this out after about 6 hours of trial and error and lots of Google. There were a few things I needed to do:

  1. For some reason the install automatically selects ipv6 in the network settings. To me this is ridiculous, but easily fixed:

Yast>Network Devices>Network Settings

Under IPv6 Protocol Settings uncheck Enable IPv6.

  1. in your smb.conf file add the following line under workgroup name:

workgroup = WORKGROUP
name resolve order = bcast host lmhosts wins

  1. Samba Server config

Under “Shares”

Make sure “Allow Users to Share Their Directories” and “Allow Guest Access” are checked

Under “Identity”

Domain Controller - Not a DC

WINS = WINS Server Support
Check “Retrieve WINS server via DHCP”

  1. Firewall Settings

Under “Allowed Services”
Allowed Services for Selected Zone - External Zone
“Service to Allow” - DHCPv4 Server

then allow the following:
Netbios Server
Samba Client
Samba Server

finish with the following"

systemctl enable smb.service

systemctl enable nmb.service

now shares are accessible

Also, you may find help here:

Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

Good Luck

Solved. It turns out if I stopped the winbind service on ftp2 the share worked ok. When I compared the nsswitch.conf on ftp1 to the one on ftp2 saw the on on ftp2 had the entries:

passwd: compat winbind
group: compat winbind

whereas the one on ftp1 said:

passwd: compat
group: compat

When I removed the winbind parameter in the ftp2 nsswitch.conf and restarted the winbind service everything worked ok.

Nice! I see that I was quite far from the truth, I would never think of checking nsswitch.conf!

Thanks for the feedback and have fun with openSUSE,