Bug 10586 - samba-tool fails with "unable to load default file" when client-specific logging is enabled
Summary: samba-tool fails with "unable to load default file" when client-specific logg...
Status: RESOLVED DUPLICATE of bug 9898
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.1.6
Hardware: All Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-04 20:02 UTC by andreasfleig+samba
Modified: 2022-08-21 23:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreasfleig+samba 2014-05-04 20:02:02 UTC
Steps to reproduce
------------------

1. Configure client-specific logging as described in [0] by adding an include
   directive, that may or may not point to a valid filename, to smb.conf:

   include = /etc/samba/smb.conf.client-%I

2. Run: samba-tool user list


Expected results
----------------

samba-tool should ignore the failed include and show the list of
users.


Actual results
--------------

$ samba-tool user list
ERROR(runtime): uncaught exception - Unable to load default file
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line 261, in run
    lp = sambaopts.get_loadparm()
  File "/usr/lib/python2.7/dist-packages/samba/getopt.py", line 92, in get_loadparm
    self._lp.load_default()


Version
-------

$ samba-tool --version
4.1.6-Debian

$ apt-cache show samba
Package: samba
Version: 2:4.1.6+dfsg-1~bpo70+1


[0] https://wiki.samba.org/index.php/Client_specific_Log
Comment 1 Andrew Bartlett 2017-01-03 08:06:51 UTC
Yes, the AD DC parts of the codebase do not support the % macros in the smb.conf file, leading to issues like this.

Sorry,
Comment 2 Douglas Bagnall 2022-08-21 23:25:16 UTC

*** This bug has been marked as a duplicate of bug 9898 ***