# smbclient BAD_NETWORK_NAME [solved]

## Lars B.

Hi,

```

HBSVR02 samba # smbclient //localhost/printers -U root

Password:

Domain=[HBSVR02] OS=[Unix] Server=[Samba 3.0.14a]

smb: \>

HBSVR02 samba # smbclient //localhost/print/$ -U root

Password:

Domain=[HBSVR02] OS=[Unix] Server=[Samba 3.0.14a]

tree connect failed: NT_STATUS_BAD_NETWORK_NAME

HBSVR02 samba # smbclient //localhost/print$ -U root

Password:

Domain=[HBSVR02] OS=[Unix] Server=[Samba 3.0.14a]

tree connect failed: NT_STATUS_BAD_NETWORK_NAME

HBSVR02 samba #

```

my smb.conf

```

HBSVR02 printer # cat /etc/samba/smb.conf

[global]

# Replace MYWORKGROUPNAME with your workgroup/domain

workgroup = Arbeitsgruppe

# Of course this has no REAL purpose other than letting

# everyone knows it's not Windows!

# %v prints the version of Samba we are using.

server string = HBSVR02

# We are going to use cups, so we are going to put it in here ;-)

printcap name = cups

printing = cups

load printers = yes

# We want a log file and we do not want it to get bigger than 50kb.

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

max log size = 50

# We are going to set some options for our interfaces...

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# This is a good idea, what we are doing is binding the

# samba server to our local network.

# For example, if eth0 is our local network device

interfaces = lo eth0

bind interfaces only = yes

# Now we are going to specify who we allow, we are afterall

# very security conscience, since this configuration does

# not use passwords!

# hosts allow = 127.0.0.1 212.6.148.125/24

# hosts deny = 0.0.0.0/0

# Other options for this are USER, DOMAIN, ADS, and SERVER

# The default is user

security = user

guest account = samba

guest ok = yes

# We now will implement the on access virus scanner.

# NOTE: By putting this in our [Global] section, we enable

# scanning of ALL shares, you could optionally move

# these to a specific share and only scan it.

# For Samba 3.x. This enables ClamAV on access scanning.

vfs object = vscan-clamav

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

# Now we setup our printers share.  This should be

# browseable, printable, public.

[printers]

comment = All Printers

path = /var/spool/samba

browseable = no

public = yes

guest ok = yes

writable = no

printable = yes

printer admin = root

# Now we setup our print drivers information!

[print$]

comment = Printer Drivers

path = /etc/samba/drivers # this path holds the driver structure

guest ok = no

browseable = yes

read only = yes

# Modify this to "username,root" if you don't want root to

# be the only printer admin)

write list = root

```

The print$ folder exists and has all rights (changed it from 755 to 777).

I have searched for this issue but i couldn't found a solution..

Thx for any help

LarsLast edited by Lars B. on Wed Nov 23, 2005 8:20 am; edited 1 time in total

----------

## DDV01

[url]

https://forums.gentoo.org/viewtopic.php?t=110931

[/url]

 *Quote:*   

> 
> 
> Attention To avoid the dreaded NT_STATUS_BAD_NETWORK_NAME error it seems to be necessary to put the comment ("this path holds the driver structure") BEFORE or AFTER the line with path =/etc/samba/printer! Especially if you just cut'n'paste the stuff I wrote here (you shouldn't  because it's always safer to write such things on your own, as can be seen here). If it is on the same line then Samba seeks for a share with the path "/etc/samba/printer # this path holds..." which of course cannot be found. 
> 
> 

 

Remove the comment (#etc) from the path and it should work just fine

----------

