# Samba problems [solved]

## Xyun

I followed the Gentoo Quick Samba Guide and I found that when I try to call 

```
smbclient -L localhost
```

 it gives me a 

```
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.7]

tree connect failed: NT_STATUS_BAD_NETWORK_NAME
```

 error. Does anyone know how to solve this?   :Sad: Last edited by Xyun on Sat Nov 06, 2004 2:49 pm; edited 1 time in total

----------

## adaptr

Connect to its true hostname.

You may have localhost connections off in smb.conf.

----------

## Xyun

But localhost is the samba host...

----------

## adaptr

No, localhost is no host - it is the internal name for any *nix computer.

Use its real hostname, like I said.

----------

## Xyun

Please pardon my newbie-ness, but if my machine is the samba host and my hostname is XYZ, I did a 

```
smbclient -L XYZ
```

 and it still gives me the same error   :Crying or Very sad: 

----------

## adaptr

Yes, and erm... did you give your workgroup a proper name ?

Something other than WORKGROUP is what I mean.

And - is samba actually running ?

```
rc-status | grep samba
```

----------

## Xyun

Yes samba is running and my workgroup was never WORKGROUP to begin with... it is some other name.

----------

## nobspangle

post the global section of your smb.conf (without the comments)

----------

## adaptr

Better yet, post the output of

```
testparm -s
```

----------

## Xyun

Here goes:

```
[global]

        server string = Samba Server %v

        interfaces = lo, eth0

        bind interfaces only = Yes

        security = share

        guest account = smbguest

        socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192SO_RCVBUF=8192

        wins support = Yes

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

        inherit permissions = Yes

        guest ok = Yes

        case sensitive = No

        vfs objects = vscan-clamav

[public]

        path = /home/smbguest/SharedDocuments/

        read only = no
```

----------

## adaptr

So, um - you have no workgroup ?

----------

## Xyun

Lemme repost.

```
[global]

        workgroup = PROTOTYPE

        server string = Samba Server %v

        interfaces = lo, eth0

        bind interfaces only = Yes

        security = share

        guest account = smbguest

        socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192SO_RCVBUF=8192

        wins support = Yes

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

        inherit permissions = Yes

        guest ok = Yes

        case sensitive = no

        vfs objects = vscan-clamav

[public]

        path = /home/smbguest/SharedDocuments/

        read only = no

```

my hostname is already defined in /etc/hostname and my workgroup is also defined already in /etc/dnsdomainname in case u need this info too.

Still cant get it to work... my apologies for taking up your precious time.

----------

## Xyun

Lemme repost.

```
[global]

        workgroup = PROTOTYPE

        server string = Samba Server %v

        interfaces = lo, eth0

        bind interfaces only = Yes

        security = share

        guest account = smbguest

        socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192SO_RCVBUF=8192

        wins support = Yes

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

        inherit permissions = Yes

        guest ok = Yes

        case sensitive = no

        vfs objects = vscan-clamav

[public]

        path = /home/smbguest/SharedDocuments/

        read only = no

```

my hostname is already defined in /etc/hostname and my workgroup is also defined already in /etc/dnsdomainname in case u need this info too.

Still cant get it to work... my apologies for taking up your precious time.

----------

## adaptr

Use

```
security=user
```

instead.

----------

## Xyun

I dont see what the security's got to do with my bad network name. Nevertheless I tried and it still gives me the same error... BIG SIGH~   :Confused: 

----------

## DaveArb

 *Xyun wrote:*   

> Lemme repost.
> 
> ```
> [global]
> 
> ...

 

Your interfaces line is incorrect. In this option, you list the networks you wish to be able to connect to Sambe in CIDR format, for instance:

```

interfaces = 192.168.0.01/24

```

Dave

----------

## Xyun

Hmm I just followed the Samba Guide in the Gentoo Docs sections regarding that interfaces thing. Anyway, I changed it to 192.168.1.0/24 and it still doesnt work. Still same error   :Sad: 

----------

## Xyun

Anyone else got any solutions?   :Confused: 

----------

## nobspangle

try disabling your antivirus

----------

## Xyun

I'm on the verge of giving up... Still to no avail...

----------

## bassM

n00b answer follows: 

I had the same problem just a couple of minutes ago, solved it by adding the smbguest account... 

don't know if that helps ;P

----------

## Xyun

haha ok... but yes, the guest account is already there.

----------

## Xyun

Wierddd.... Ok somehow I managed to solve this issue by unmerging Samba and re-emerging it again and reconfiguring it from scratch. Oh well... Thanks for all who posted.

----------

