0

I'm fighting with Samba 4. I need to share a directory, but I'm totally unable to do it. I installed Samba 4 from source code (as described on the Samba Wiki). It works, but today I made a critical decision - I decided to share one directory. But my Samba works without any configuration file and when I create some /etc/smb.conf or /etc/samba/smb.sonf, it ignores them. I would like to persuade me, what's going on, but I neither know, where does Samba4 log the errors.

Do you anybody know, where is the location, the Samba4 looks up its configuration in and where is the log file?

1 Answers1

3

Building from source is fine as long as you package the software, or you will soon find yourself managing a dependency hell. Always try backporting first, or at a very least package the software using checkinstall or fpm.

Regarding your question, the same wiki page tells you where the configuration file is expected to be found: /usr/local/samba/etc/smb.conf.

Also, check the smbd() manpage:

       -s|--configfile 
           The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as
           descriptions of all the services that the server is to provide. See smb.conf for more information. **The default configuration file name is determined at compile time.**

(Emphasis is mine)

So a rough approach, if you have used the default name for the configuration file, would be:

# strings $(which smbd) | grep smb.conf

Once you find your configuration file, you will know where to look for the log files, as the location is defined using the log file directive, an example:

log file = /var/log/samba/log.%m
dawud
  • 15,096
  • 3
  • 42
  • 61
  • The command `# strings $(which smbd) | grep smb.conf` froze on my PC, but the path `/usr/local/samba/etc/smb.conf` is that I looked for. Thanks – Theodor Keinstein Aug 27 '13 at 16:48