# samba not starting, even with known good config

## Raoul_Duke

I'm sure i'm missing something silly here.........just installed samba on my main box but it won't start. Like this:

```
root@trotsky samba # /etc/init.d/samba start

 * samba -> start: smbd ...                                                                                       [ !! ]

 * samba -> start: nmbd ...                                                                                       [ !! ]

 * samba -> start: winbind ...                                                                                    [ !! ]

                                                                                                                  [ !! ]

root@trotsky samba #

```

Now, i've barely touched the smb.config aprt from the bits i know i need to change. In fact i've even dropped in the smb.config from my other box because in know it works.......same result.

Any ideas?

----------

## Voltago

Anything useful in /var/log/samba/*.log?

----------

## d3vlin

same problem here after upgrading to net-fs/samba 3.0.4-r

nothing particular is written to the log files in /var/log/samba/log.smbd and /var/log/samba/log.nmbd

There seems a problem in /var/log/samba/log.winbindd:

```

[2004/06/12 21:55:03, 1] nsswitch/winbindd.c:main(843)

  winbindd version 3.0.4 started.

  Copyright The Samba Team 2000-2004

[2004/06/12 21:55:03, 0] nsswitch/winbindd_util.c:winbindd_param_init(560)

  winbindd: idmap uid range missing or invalid

[2004/06/12 21:55:03, 0] nsswitch/winbindd_util.c:winbindd_param_init(561)

  winbindd: cannot continue, exiting.

```

----------

## Raoul_Duke

Idd,

After a bit of playing around i noticed that samba does actually start. Although when queried it says it's not running, i can browse from my laptop in XP.

Very weird.......will play around some more

----------

## Riftwing

I ended up just removing winbind from /etc/conf.d/samba.

----------

## Merlin-TC

Same here, this just happened after I emerged a new Samba Version.

Does anyone have a clue what could be wrong?

I also get this message in the log.winbindd :

```

[2004/06/13 14:01:31, 0] nsswitch/winbindd_util.c:winbindd_param_init(560)

  winbindd: idmap uid range missing or invalid

[2004/06/13 14:01:31, 0] nsswitch/winbindd_util.c:winbindd_param_init(561)

  winbindd: cannot continue, exiting.

```

It's the new version for sure because before it worked like a charm.

----------

## nobspangle

I haven't installed this version (I don't like messing up my system for the sake of it) but from what you have all posted it looks like they've changed the init script so that it starts winbind. In the old release winbind was started seperatley using /etc/init.d/winbind

If you didn't use winbind before then you won't need to use it now, winbind is only used when security=domain

It looks like it's the fault of this bug you might want to file a bug to see if you can get the defaults changed to smbd and nmdb on and winbindd off

----------

## Merlin-TC

Ok, I just disabled winbind now, I just run a homenetwork so I don't need any domain controllers if that's what it's for.

Thanks again  :Smile: 

----------

## d3vlin

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

This solves the problem. Just add a few lines to your smb.conf about winbind.

After that, samba starts normal again (smbd, nmbd, winbindd)

----------

## nobspangle

That does solve it but, it's only a work around.

Winbind is only any use if your samba server is a member of a windows domain. It allows you to use your domain usernames and passwords as unix usernames and passwords.

If you don't have a windows domain then you shouldn't be running winbind

The correct fix for this is to edit /etc/conf.d/samba and remove winbind from the list of daemons to start.

I have posted a bug suggesting that the default configuration should be smbd and nmbd only so that you are required to enable winbind if you need it.

----------

## Raoul_Duke

 *nobspangle wrote:*   

> That does solve it but, it's only a work around.
> 
> Winbind is only any use if your samba server is a member of a windows domain. It allows you to use your domain usernames and passwords as unix usernames and passwords.
> 
> If you don't have a windows domain then you shouldn't be running winbind
> ...

 

Yup, that does the trick.......nice one   :Wink: 

----------

## absinthe

That's not good default behavior, esp considering winbind was handled separately before.    There should be some ewarns about this during the install.

----------

## nobspangle

I emerged samba 3.0.4 today and the script has been changed, it now only starts nmbd and smbd unless you add winbind to the daemon list in /etc/conf.d/samba

However this was on my system where I use winbind and after enabling it it didn't seem to work, said it was running but it couldn't get a list of names. I have gone back to 3.0.2a I think I'll wait for it to be marked stable.

----------

## arkhan_jg

 *absinthe wrote:*   

> That's not good default behavior, esp considering winbind was handled separately before.    There should be some ewarns about this during the install.

 

Absolutely. I upgraded samba to 3.0.4, and after restarting samba (winbind can get a bit cranky if upgraded and not restarted) and found the /etc/init.d/winbind script had disappeared while no pointers to /etc/conf.d/samba daemon_list were given.

Since my box does tie into an NT domain for user authentication, I couldn't login to my main account without it. I eventually worked around the problem by running winbindd manually.

I can live with winbind not being part of the default services (it's only of use for domain logins, after all) but some ewarns that the behaviour has changed would be nice, and a pointer to /etc/conf.d/samba would have saved me a fair bit of troubleshooting. Probably not a bad idea to prompt people to remove winbind from their runlevel too, and replace with samba.

----------

## .:deadhead:.

Hi guys, I've got a server without  :Evil or Very Mad:  

```
/etc/conf.d/samba
```

 The version I use of Samba is 3.0.2a. I honestly don't know how it has happened  :Embarassed:  but the fact is that now I that file isn't there. 

I've already tried to re-emerge samba but that file hasn't been restored. Is there a way to restore it? Or could anybody post his own?

thank you

----------

## nobspangle

If you installed samba before 3.0.4 was released then you don't need a /etc/conf.d/samba file. Now that you've re installed you probabaly will. There have been a few changes made to the 3.0.2ra ebuild today, so if you emerge sync and then emerge samba you will get the /etc/conf.d/samba file that you didn't need before but you do now.

----------

## .:deadhead:.

 *nobspangle wrote:*   

> There have been a few changes made to the 3.0.2ra ebuild today, so if you emerge sync and then emerge samba you will get the /etc/conf.d/samba file that you didn't need before but you do now.

 

Ahhh... so it hasn't been my fault...  :Cool: 

Anyway, after an 

```
emerge sync;emerge samba
```

now everything work perfectly  :Smile: 

```
root@POWEREDGE log # /etc/init.d/samba restart

 * samba -> stop: smbd ...                                                                                            [ ok ]

 * samba -> stop: nmbd ...                                                                                            [ ok ]

 * samba -> start: smbd ...                                                                                           [ ok ]

 * samba -> start: nmbd ...                                                                                           [ ok ]
```

thank U

deadhead

----------

## snowbum

Indeed this is the issue with the 3.0.2 ebuild - there was no /etc/conf.d/samba file. I've re-emerged to version 3.0.2r2 and it works fine.

----------

## Baric

Same problem here, I have Samba 2.x and did a world update back on 6/14 and didn't notice that Samba was no longer running til this morning (I don't use it all that often).  The update brought in Samba 3.0.2.  But "/etc/init.d/samba start" did nothing, although it said OK.  Running smbd by hand worked just fine.  

Doing an "emerge sync", then "emerge samba" fixed the problem.  Thanks for the info.

----------

