[Samba] How to prevent "Can't load smb.conf"
R. Diez
rdiez-2006 at rd10.de
Sat Feb 28 20:46:33 UTC 2026
Hi all:
I need a newer version of smbcacls, so I built Samba from sources and installed it under $HOME. The workstation does not need the Samba server, it only runs that one client tool.
When I run smbcacls, I get this warning:
Can't load /home/rdiez/somewhere/samba-4.23.4-bin/etc/smb.conf - run testparm to debug it
I guess that happens with other Samba client tools too.
The thing is, I do not really need a smb.conf configuration file. All connection settings are passed directly to smbcacls. Furthermore, if I am connecting to different hosts, I wonder whether a single smb.conf would do. I fact, for a dynamic scenario, creating such files on the fly would be a hassle.
The man page does not say how to prevent that warning. It is not clear upfront, but if you read the man page carefully after seeing that warning, then you can deduce that smbcacls unconditionally reads that configuration file, but the man page does not document which settings smbcacls reads (or uses) from that file.
I resorted to passing this command-line option:
--configfile=/dev/null
That seems to work. But is that the right way to do it?
Regards,
rdiez
More information about the samba
mailing list