Bug 2248840 - samba-tool can not load the default configuration file
Summary: samba-tool can not load the default configuration file
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pavel Filipensky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-09 08:59 UTC by cornel panceac
Modified: 2024-10-01 11:53 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-10-01 11:53:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
original samba.conf (940 bytes, text/plain)
2024-01-08 11:28 UTC, cornel panceac
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SSSD-7144 0 None None None 2024-03-05 13:06:24 UTC
Red Hat Issue Tracker SSSD-7916 0 None None None 2024-08-21 09:48:03 UTC
Samba Project 15698 0 None None None 2024-08-21 09:46:40 UTC

Description cornel panceac 2023-11-09 08:59:24 UTC
$ sudo samba-tool domain provision --interactive
[sudo] password for cornel: 


Reproducible: Always

Steps to Reproduce:
1.sudo samba-tool domain provision --interactive
2.
3.
Actual Results:  
ERROR(runtime): uncaught exception - Unable to load default file
  File "/usr/lib64/python3.12/site-packages/samba/netcmd/__init__.py", line 279, in _run
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/samba/netcmd/domain/provision.py", line 182, in run
    lp = sambaopts.get_loadparm()
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/samba/getopt.py", line 120, in get_loadparm
    self._lp.load_default()


Expected Results:  
samba-tool works.

testparm works fine

$ rpm -qf $(which samba-tool)
samba-tools-4.19.2-1.fc39.x86_64

Comment 1 Andreas Schneider 2023-11-10 07:25:04 UTC
I'm not able to reproduce this:

krikkit:~ # rm -f /etc/samba/smb.conf
krikkit:~ # samba-tool domain provision --interactive
Realm: wurst.brot

Does /etc/samba/smb.conf exist? What are the permissions of the file?

Comment 2 cornel panceac 2023-11-10 08:15:03 UTC
I confirm that the problem goes away if i remove smb.conf first.
I can reproduce it only if smb.conf is already present.
Thank you.

Comment 3 Andreas Schneider 2023-11-10 16:06:42 UTC
Can you share the failing smb.conf?

Comment 4 cornel panceac 2023-11-11 09:44:32 UTC
it's the default smb.conf, i'll share it on monday.

Comment 5 cornel panceac 2024-01-08 11:28:51 UTC
Created attachment 2007754 [details]
original samba.conf

Comment 6 cornel panceac 2024-01-16 18:13:48 UTC
what info is needed?

Comment 7 Andre Boscatto 2024-01-17 18:16:28 UTC
Hi Cornel,

I added the flag to Andreas to come back here later this week or the next one. There is no further action pending from your side at the moment, my apologies if it gave a wrong message.

Kindly

Comment 8 Pavel Filipensky 2024-08-21 09:46:41 UTC
The bug is fixed in upstream: https://bugzilla.samba.org/show_bug.cgi?id=15698 and will be backported to samba 4.20/4.21.


Note You need to log in before you can comment on or make changes to this bug.