Bug 11884 - nmbd cannot override socket-dir at init time
Summary: nmbd cannot override socket-dir at init time
Status: CLOSED WORKSFORME
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.4.2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-01 00:39 UTC by interfaSys
Modified: 2018-10-21 19:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description interfaSys 2016-05-01 00:39:26 UTC
It's possible to define a prefix, localstatedir or sockets-dir at build time, but it's impossible to override those values when launching nmbd, leading to the following problem when launching in an environment which is different from the one defined when Samba was compiled :

```
mkdir failed on directory /var/run/samba/nmbd: No such file or directory
ERROR: nb_packet_server_create failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
STATUS=daemon failed to start: NMBD failed to setup packet server., error code 13

```
Comment 1 Christian Ambach 2016-05-23 20:45:55 UTC
Can you try setting the (undocumented) nmbd:socket dir option?
Comment 2 interfaSys 2016-05-23 22:17:55 UTC
Thanks!

I couldn't get it to work from the command line using
"--option=nmbd:socket-dir=${NMBD_SOCKET}"

But adding it to the configuration file worked.

Is the option missing from nmbd?
Comment 3 Christian Ambach 2016-06-06 21:47:04 UTC
It'll work once you use the correct syntax:

--option="nmbd:socket dir=/tmp/bla"

works for me.