[Samba] [4.13.13-Debian] " reopen_one_log: Unable to open new log file '/var/log/samba/': Is a directory"?
mjt at tls.msk.ru
Wed Jan 11 10:23:19 UTC 2023
11.01.2023 13:15, Rowland Penny via samba wrote:
>>> smb.conf: log file = /var/log/samba/%m
>> some daemons work without client information, ie, they're not client-specific.
>> These will try to open log files too. Without client info, "%m" expands to
>> nothing, to an empty string. So you'll have the error message like that.
>> Fix your log file setting. Check what's the default for this.
> There isn't a default and '%m' is supposed to work.
> I think we need to see how the OP is running Samba, to do this, we need the output of 'testparm -s' or 'samba-tool testparm' if it is a DC (which it
> shouldn't be, because it looks like nmbd is running).
Sigh. Rowland, sometimes you're not helpful at all. Like in this case.
Yes there's no default for "log file" parameter, - that's my bad, I remember
seeing "/var/log/samba/log.%m" somewhere - it is not the default, it is the
"example value" in man 5 smb.conf.
As you wrote multiple times yourself, netbios is dead. %m is a netbios
name of the client. And at the description of %m in man 5 smb.conf we
This parameter is not available when Samba listens on port 445, as
clients no longer send this information. If you use this macro in
an include statement on a domain that has a Samba domain controller
be sure to set in the [global] section smb ports = 139. This will
cause Samba to not listen on port 445 and will permit include
functionality to function as it did with Samba 2.x.
/var/log/samba/%m is *not* supposed to work, exactly the way it doesn't
work in the OP case. The only thing needed for him is to fix the
log file parameter as I suggested to fix the issue.
Please stay a bit more focused.
More information about the samba