Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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
share|improve this answer
    
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 –  K. T. Schnikow Aug 27 '13 at 16:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.