# Help! - Samba is Kicking My Butt.

## Bob P

I'm having problems getting Samba up and running on my Linux box so that I can access some of the Windows shares on my LAN. Something is currently so buggered-up that I can't even get the daemons to boot.

If anyone can spot an obvious problem, I'd appreciate your help.   :Wink: 

```
# cat log.smbd

[2005/02/20 19:03:37, 0] smbd/server.c:main(798)

  smbd version 3.0.11 started.

  Copyright Andrew Tridgell and the Samba Team 1992-2004

[2005/02/20 19:03:37, 1] auth/auth_util.c:make_server_info_sam(808)

  User samba in passdb, but getpwnam() fails!

```

```
# cat log.nmbd

[2005/02/20 19:03:37, 0] nmbd/nmbd.c:main(668)

  Netbios nameserver version 3.0.11 started.

  Copyright Andrew Tridgell and the Samba Team 1994-2004

[2005/02/20 19:03:37, 0] nmbd/asyncdns.c:start_async_dns(149)

  started asyncdns process 9971

[2005/02/20 19:03:37, 0] nmbd/nmbd.c:terminate(56)

  Got SIGTERM: going down...

```

```
# cat /etc/samba/smb.conf

[global]

workgroup = 346net

server string = Samba Server %v

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

max log size = 50

printcap name = cups

printing = cups

load printers = yes

socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192

interfaces = lo eth0

bind interfaces only = yes

hosts allow = 127.0.0.1 192.168.1.100 192.168.1.101 192.168.1.102 192.168.1.103 192.168.1.104 192.168.1.105

#hosts deny = 0.0.0.0/0

security = share

#security = user

#guest account = guest

guest account = samba

guest ok = yes

vfs objects = vscan-clamav

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

# disallow privileged accounts

#invalid users = root @wheel

restrict anonymous = no

domain master = no

preferred master = no

max protocol = NT

ldap ssl = No

server signing = Auto

time server = yes

case sensitive = no

msdfs proxy = no

read only = no

encrypt passwords = no

wins support = yes

paranoid server security = no

[public]

comment = Public Files

browseable = yes

public = yes

create mode = 0766

guest ok = yes

path = /home/samba/public

[homes]

case sensitive = yes

path = /home/

[BOB]

path = /home/bob/

force user = bob

```

----------

## TheRAt

```
hosts allow = 127.0.0.1 192.168.1.100 192.168.1.101 192.168.1.102 192.168.1.103192.168.1.104 192.168.1.105

                                                                               ^

                                                                               missing <space>

```

----------

## Bob P

 *TheRAt wrote:*   

> 
> 
> ```
> hosts allow = 127.0.0.1 192.168.1.100 192.168.1.101 192.168.1.102 192.168.1.103192.168.1.104 192.168.1.105
> 
> ...

 

thanks for catching that.  as it turns out, that missing space does indeed exist in my post, but it doesn't exist in my actual smb.conf file.  that lost space was created by a linewrap and a cut and paste operation on my part, where i lost the space.  in the actual config file, the space is there.

i was thinking that the problem was probably related to this:

```
  User samba in passdb, but getpwnam() fails! 
```

----------

## TheRAt

Do you have a samba user or a user mapping for the samba user in your system ?? smbpasswd / smbusers?

Also, is there a real unix user for that mapping / samba user in the system?

----------

## nobspangle

Here are four things that should get you up and running.

1. use security = user not security = share

2. don't set guest account = samba unless you have set up a username map for this user to a unix user

3. add map to guest = bad user

4. turn off clam-av untill you get the system working, one thing at a time.

----------

## Bob P

 *nobspangle wrote:*   

> Here are four things that should get you up and running.
> 
> 1. use security = user not security = share
> 
> 2. don't set guest account = samba unless you have set up a username map for this user to a unix user
> ...

 

thanks for your help.  i've made the following changes:

```
security = user

#guest account = samba

map to guest = bad user

# turned off clam-av
```

it turns out that guest account = samba seemed to be what was keeping the daemons from starting -- presumably because i didn't have a username map to a unix user named samba.

now that the daemons are up and running, i'm still having the problems that i've always had with samba:  difficulty in connecting Windows servers whose shares are visible to all of the win boxes on the LAN.

when i try to browse the shares using Home Icon > Lan Browser, the system displays SMB as a sumbenu beneath the windows server's name, "gateway".  (so far so good).  unfortunately, samba fails when trying to actually browse the shares on the samba server and issues the following error message:

 *Quote:*   

> The file or folder smb://gateway.346net/ does not exist.

 

this is what /etc/hosts looked like:

```
#

127.0.0.1       localhost.localdomain   localhost

# IPV6 versions of localhost and co

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

192.168.1.1     router.346net           router

192.168.1.100   gentoo.346net           gentoo

192.168.1.101   gateway.346net          gatweay
```

knowing that the windows server is set-up using the alias "gateway" on the "346net" workgroup, i thought that the full-qualified hostname (localhost.localdomain syntax) may have been causing a problem, as the windows workgroup seems to use the equivalent of linux short-hostnames.  

i eliminated the second column of data in the last three lines of the hosts file, and rebooted.  then the samba client on the linux box began to see the windows shares on the windows host named gateway.  :Cool:   for now it seems that i've solved half of the problem, as the samba client on my linux box appears to be working.

as an interesting side effect, changing the "localhost.localdomain" entry on my linux box from "gentoo.346net" to the "localhost" format of "gentoo" resulted in a change in the bootup display on my linux box.  instead of saying this at bootup:

```
This is gentoo.346net (Linux i686 2.6.10-gentoo-r5 HH:MM:SS

```

the PC now says this at bootup:

```
This is gentoo.(none) (Linux i686 2.6.10-gentoo-r5 HH:MM:SS

```

AARGH!  is it possible to keep the gentoo.346net, or do i have no other choice than to lose this in the name of samba functionality?

one other very pesky problem remains -- i cannot get the samba server on the linux box to accept logons from the windows boxes.  the linux box does appear in the Windows Network Neighborhood as a server.  when i click on the GENTOO server icon in the Windows Network Neighborhood, a log-on dialog box pops-up.  unfortunately, when i supply a valid password for the windows user, the password is rejected and the following error is issued:

```
The password is incorrect.  Try again.
```

fwiw, i am using the same username:password on both the windows box and on the linux box, and i am logged into the windows box with the correct username:password.  when i attempt to log onto the linux shares from the windows box, i am not offered the chance to change the username -- i am only asked for a password.  i am presuming that windows is passing the logged-in windows username to the samba server on the linux box, and that the linux box is prompting for the same user's password.  am i wrong on that?  what username is actually being used in the attempts to log onto the linux box's samba server?

i'm a but stumped as to why the samba server on linux doesn't seem to be working.  maybe it is working and i just have a password configuration problem.

ideas?  

thanks!

----------

## Bob P

/* bump */

----------

## Scoody

Try turning on password encryption, all Windows' uses encrypted passwords, unless you're using an ancient one  :Wink: 

encrypt passwords = yes

----------

## Bob P

 *Scoody wrote:*   

> Try turning on password encryption, all Windows' uses encrypted passwords, unless you're using an ancient one 
> 
> encrypt passwords = yes

 

LADIES AND GENTLEMEN, WE HAVE A WINNER!!!

my second problem is [SOLVED], as the samba client and the samba server are both working in the Gentoo box.  thanks for the tip.  i've been fighting with samba since october, and i've been pulling my hair out.  you've managed to save what little hair that i have left.   :Very Happy: 

unfortunately i still have the first problem:

```
This is gentoo.346net (Linux i686 2.6.10-gentoo-r5 HH:MM:SS

```

versus this:

```
This is gentoo.(none) (Linux i686 2.6.10-gentoo-r5 HH:MM:SS

```

AARGH!  is it possible to keep the gentoo.346net, or do i have no other choice than to lose this in the name of samba functionality?

----------

## TheRAt

 *Bob P wrote:*   

> unfortunately i still have the first problem:
> 
> ```
> This is gentoo.346net (Linux i686 2.6.10-gentoo-r5 HH:MM:SS
> 
> ...

 

Have you tried this from the Gentoo Wiki?

----------

## Bob P

 *TheRAt wrote:*   

> Have you tried this from the Gentoo Wiki?

 

i didn't read the wiki article, but yes, i set-up fully-qualified domain names long ago.  that's what i meant by the term fully-qualified domain name in the previous post.

here is a peek at the relevant files:

cat /etc/conf.d/hostname:

```
HOSTNAME="gentoo"
```

cat /etc/conf.d/domainname:

```
OVERRIDE=1

DNSDOMAIN="346net"

#NISDOMAIN=""
```

as mentioned in the previous post, in spite of the FQDN entries, changing the content of "/etc/hosts" is necessary to enable the samba client on the gentoo box, and this has the added side-effect of changing "gentoo.346net" to "gentoo.(none)" at bootup.  :Confused: 

thanks again for your help.

----------

