# tree connect failed: NT_STATUS_BAD_NETWORK_NAME

## furrynose

hello

having trouble getting samba set up.   whenever i try to log on to the samba on the linux box i get an error saying tree connect failed: NT_STATUS_BAD_NETWORK_NAME.

I have tried changing the hostname and have checked the directories in the smb.conf file to make sure that they are real.  I when through thesups.org troubleshooting section, and as far as i can

can see, they dont reference the problem that i am having.  below is the output from trying to log onto samba as well as testparm.  ( it will put and get files from the windows machine, but the windows machine will not show any shares from the linux box.  when i click on the samba servor in the workgroup folder, it gives me a signon dialogue, but then says that the network name cannot be found)

greatly appreciate any suggestions

furrynose

gentoone ~ # smbclient //gentoone/tmp

Password:

Domain=[GENTOONE] OS=[Unix] Server=[Samba 3.0.22]

tree connect failed: NT_STATUS_BAD_NETWORK_NAME

gentoone ~ # testparm

Load smb config files from /etc/samba/smb.conf

Processing section "[print$]"

Processing section "[epson]"

Processing section "[EPSONStylusC]"

Processing section "[printers]"

Processing section "[public]"

Processing section "[tmp]"

Loaded services file OK.

WARNING: passdb expand explicit = yes is deprecated

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

[global]

        workgroup = WHISKAS

        server string = Samba Server %v

        interfaces = eth0

        bind interfaces only = Yes

        passdb backend = tdbsam

        log level = 3

        log file = /var/log/samba/log.%m

        max log size = 50

        smb ports = 445

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        printcap name = cups

        local master = No

        wins server = 192.168.0.130

        vscan-clamav:config-file = /etc/samba/vscan-clamav.conf

        guest ok = Yes

        hosts allow = 127.0.0.1, 192.168.0.130, 192.168.0.180, 192.168.0.173

        vfs objects = vscan-clamav

[print$]

        comment = Printer Drivers

        path = /usr/share/cups/drivers

        write list = root

        guest ok = No

[epson]

        comment = epson csx4600

        path = /var/spool/samba

        printable = Yes

[EPSONStylusC]

        comment = epson csx4600

        path = /var/spool/samba

        printable = Yes

[printers]

        comment = All Printers

        path = /var/spool/samba

        printable = Yes

        browseable = No

[public]

        comment = Public Files

        path = /home/samba/public

        create mask = 0766

[tmp]

        comment = temporary files

        path = /tmp

gentoone ~ #

gentoone ~ # nmblookup -B gentoone _SAMBA_

added interface ip=192.168.0.173 bcast=192.168.0.255 nmask=255.255.255.0

Socket opened.

querying _SAMBA_ on 192.168.0.173

name_query failed to find name _SAMBA_

gentoone ~ # nmblookup -B desk-home '*'

added interface ip=192.168.0.173 bcast=192.168.0.255 nmask=255.255.255.0

Socket opened.

querying * on 192.168.0.130

Got a positive name query response from 192.168.0.130 ( 192.168.0.130 )

192.168.0.130 *<00>

gentoone ~ # nmblookup -B gentoone '*'

added interface ip=192.168.0.173 bcast=192.168.0.255 nmask=255.255.255.0

Socket opened.

querying * on 192.168.0.173

Got a positive name query response from 192.168.0.173 ( 192.168.0.173 )

192.168.0.173 *<00>

gentoone ~ #

gentoone ~ # cupsaddsmb -H gentoone -U root -h localhost -v epson

Password for root required to access gentoone via SAMBA:

Running command: smbclient //gentoone/print\$ -N -U'root%blacknose' -c 'mkdir W32X86;put /var/spool/cups/tmp/447c79bb03cc2 W32X86/epson.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Domain=[GENTOONE] OS=[Unix] Server=[Samba 3.0.22]

tree connect failed: NT_STATUS_BAD_NETWORK_NAME

----------

## GoofballJM1

I noticed your workgroup and domain are different (WHISKAS & GENTOONE).  Have you tried changing those to the same name?

----------

## furrynose

I don't understand why the domaind would be lissted as gentoone.  it should be whiskas.  here are the host and domain files:

127.0.0.1       localhost  gentoone

192.168.0.130   desk-home.WHISKAS desk-home

192.168.0.180	nad.WHISKAS nad

192.168.0.173   gentoone.WHISKAS gentoone

# Set to the hostname of this machine

HOSTNAME="gentoone"

When setting up resolv.conf, what should take precedence?

#  0 = let dhcp/whatever override DNSDOMAIN

#  1 = override dhcp/whatever with DNSDOMAIN

OVERRIDE=1

DNSDOMAIN="whiskas"

I also don't understand why testparm lists  "role_standalone"

Is there a proceedure for joining the network that i missed?

thanks for the response

furrynose

----------

## furrynose

ok  I found that i should join a the network before i started samba, so i went so far as to unmerge samba and re-emerge it according to the instructions i found at

http://gentoo-wiki.com/HOWTO_Add_a_gentoo_server_to_a_windows_network

and proceeded to try the cammand:

whiskers ~ # net join -Uroot%password

[2006/05/31 20:06:01, 0] utils/net_ads.c:ads_startup(191)

  ads_connect: No such file or directory

Unable to find a suitable server

Unable to find a suitable server

whiskers ~ # net rpc join -Uroot%password

Unable to find a suitable server

Unable to find a suitable server

whiskers ~ #

I am at a loss.  if anyone has any suggestion, i would be quite grateful.

thanks in advance

furrynose

----------

## GoofballJM1

Are you trying to join an existing active directory domain, or be a domain master with the linux machine?

----------

## furrynose

I just want to join the network which consists of two xp home edition computers.

----------

## GoofballJM1

Have you tried commenting out the clamav stuff in there?  I have never been able to get clamav working with Samba.  It might work for you to try doing that.  If that doesn't work, I would suggest starting over from scratch and follow this guide here:

Samba Quick Howto

It should get you up and running pretty quick.

The trick with samba is to set it up as basic as possible, and then work up to a more complex configuration.  That way if something breaks, you can easily determine what it is.

----------

## furrynose

I have never gotten it to join a network but i did get the thing to function...  

the net join command tries to join a domain - i just switched security to share, and didn't bother with the join command at all.  

i used a configuration that i found in teh gentoo wiki  http://gentoo-wiki.com/HOWTO_Add_a_gentoo_server_to_a_windows_network

and made some changes to the configuration that they had there, mainly the security=share thing. and of course just skipped the join step.

I still have the problem that i don't see shares listed in the gnome places -> network servers, so i cant really access windows shares as readily as i would like,

but at least it is possible from the command line.

thanks for the suggestions

furrynose

----------

## GoofballJM1

From the Wiki article you posted:

"This article will cover adding a Gentoo system to a Windows NT Style Domain as a Member Server."

This is not what you want.  This is exactly why your setup is NOT working.  A windows NT style domain server is what you set up at a large scale office network, with several client workstations.  From what you have told me, you have two windows XP Home machines.  This would never work even if you spent your entire day working on it because you can't log onto a Domain Server using XP Home Edition.  You are using the wrong howto.  All you need is netbios enabled.  Like I said earlier, start over and use the Quick Samba howto that I posted and you will be up and running in a few minutes.

----------

## su

 *GoofballJM1 wrote:*   

> Have you tried commenting out the clamav stuff in there?  I have never been able to get clamav working with Samba.  It might work for you to try doing that.  If that doesn't work, I would suggest starting over from scratch and follow this guide here

 

Just a heads-up for anyone who reads this thread still. I had the same problem, tried removing the clamav stuff and viola! working.

Thanks for all the tips guys.

----------

