# nmbd_enable: not found



## pniky (Jan 2, 2013)

Dear fellows,

I have installed FreeBSD 9.0 LTS on VirtualBox on my I7-3930 with Windows 7 Professinal 64 and after pkg_add-ing _Gnome_ and _KDE_, I tried to start Samba according to FreeBSD's handbook Chapter 30.9. After some "not found" messages I have donne
[CMD=]pkg_add -r samba34[/CMD]
After that I edited /usr/local/etc/smb.conf with my workgroup and with a *public* share, put _nmbd_enable="YES"_ and _smbd_enable="YES"_ in /etc/rc.conf, restarted and tried
[CMD=]/usr/local/etc/rc.d/samba start[/CMD]
with the result

```
/etc/rc.conf: nmbd_enable: not found
/etc/rc.conf: smbd_enable: not found
Removing stale Samba tdb files:  donne
```
BTW: I get plenty of the first two lines on boot also.
I searched with those expressions on Google and on your forums without finding anything relevant.

Looking on samba.org I tried
[CMD=]/usr/local/sbin/nmbd -D[/CMD]
and
[CMD=]/usr/local/sbin/smbd -D[/CMD]
which worked great, being able to access the *public* share both from the host Windows 7 and my wife's Windows XP.

I believe that the /usr/local/etc/rc.d/samba script tries to locate smbd and nmbd somwhere else from where they are, but I don't know where to put them. Can anyone give me any hint? Or any other advice on what to do not to have to start samba daemons manually?!?


----------



## wblock@ (Jan 2, 2013)

Please show your actual rc.conf.  It is not necessary to start nmbd(8) and smbd(8) separately.


----------



## pniky (Jan 2, 2013)

This is my rc.conf:

```
hostname="xxxxxx"
ifconfig_em0="DHCP"
sshd_enable="YES"
moused_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
inetd_enable="YES"
hald_enable="YES"
dbus_enable="YES"
nmbd_enable = "YES"
smbd_enable = "YES"
# kdm4_enable="YES"
```

I acted according to FreeBSD Handbook, as follows [always prefer "fine grain control"]:

_The net/samba34 port adds a new startup script, which can be used to control Samba. To enable this script, so that it can be used for example to start, stop or restart Samba, add the following line to the /etc/rc.conf file:_

[CMD=""]samba_enable="YES"[/CMD]

_Or, for fine grain control:
_
[CMD=""]nmbd_enable="YES"[/CMD]

[CMD=""]smbd_enable="YES"[/CMD]

_    Note: This will also configure Samba to automatically start at system boot time.

It is possible then to start Samba at any time by typing:_


```
# /usr/local/etc/rc.d/samba start
Starting SAMBA: removing stale tdbs :
Starting nmbd.
Starting smbd.
```


----------



## wblock@ (Jan 2, 2013)

pniky said:
			
		

> This is my rc.conf:
> 
> ```
> nmbd_enable = "YES"
> ...



There's the error.  Do not put spaces in those lines, which will cause them to be interpreted differently.


----------



## knarf (Jan 2, 2013)

```
nmbd_enable = "YES"
smbd_enable = "YES"
```

Remove the whitespaces around the "=".


----------



## pniky (Jan 2, 2013)

Thanks, guys, it worked!!!

I can't believe I watched this file so many times and didn't saw the obvious! After _dumpdev_ is all mine, but I don't know how this slipped to me... The hand typed automatically in the "beautiful style" and the eye parsed it as "correct" by default...

BTW: How do I mark the thread as "solved"? Or this is donne by a moderator?


----------



## wblock@ (Jan 2, 2013)

You can edit posts after you've made ten of them.  Then edit the first post, Go Advanced, and there's a dropdown before the title to mark a thread solved.


----------

