If a user-wide smb.conf file is available, the system-wide smb.conf is ignored.
The user-wide smb.conf should only override options in the system-wide smb.conf,
and the system-wide smb.conf still be used.
I don't understand your report. Please provide more details.
Dropping priority until there is sufficient information to work
If you have a ~/.smb/smb.conf, /etc/samba/smb.conf is completely ignored.
The user's smb.conf should only be used to override parameters from the
- system-wide contains the codepage to be used
- if an empty ~/.smb/smb.conf file exists, the compiled-in default codepage is
used, instead of the system-wide one
This has an interesting collateral effect. At least the gnome network viewer,
which shows all smb machines on the local LAN, relies on this "bug". It creates
an emtpy ~/.smb/smb.conf file, otherwise network browsing could perhaps not work.
I'll try to explain what happened here.
- client machine not running samba but with samba installed and
/etc/samba/smb.conf using workgroup=MYGROUP
- server machine, *misconfigured*, also in the MYGROUP group, with samba running
(perhaps just nmbd (I don't have shell access there), that's the problem, but
- lots of other smb machines in other groups, all working perfectly and
"dirfd = smbc_opendir( "smb://" );" on the client machine would always return -1
in this scenario. Once, however, I changed the workgroup of the client machine
to something else other than MYGROUP, then smbc_opendir (and kio-smb from KDE
also) would work. The issue is that the misbehaving server machine in the
MYGROUP group somehow caused the browsing of all the other groups to fail.
We saw this when we inspected gnome's code for their network browsing tool. They
simply create an emtpy ~/.smb/smb.conf file first. With this, they effectively
use a blank workgroup setting and this error doesn't happen (but many others
could be introduced, like what was reported in this ticket).
BTW, I used samba-3.0.4 on the client. The servers are mixed (some 2.2.x, some 3.x).
Is there a way to set a blank workgroup through libsmbclient? Or only via the
configuration file? I guess all these "network neighbourhood" type programs use
As a reference, here is the corresponding gnome ticket:
It was asked that they remove this behaviour, at least until the option merge is
Added configuration file ~/.smb/smb.conf.append which is read after the global
configuration file, allowing modifying some global parameter settings.
~/.smb/smb.conf.append is read ONLY if the global configuration file was found
The meaning of ~/.smb/smb.conf remains, for backward compatibility, that if it
is found, it is read, but the global configuration file is not read. By
implication, this means that ~/.smb/smb.conf.append is not used if
~/.smb/smb.conf is used.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.