Bug 15529 - samba-tool domain backup rename is broken
Summary: samba-tool domain backup rename is broken
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.21.1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-07 10:19 UTC by Björn Jacke
Modified: 2024-10-22 13:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2023-12-07 10:19:05 UTC
The following command should make a backup of the domain int.bla.com and rename it to test.example.com but it fails with current samba versions as shown below:

samba-tool domain backup rename test test.example.com  --server=dc1.int.bla.com --targetdir=/root/backup-backup -U "administrator@int.bla.com"

...
INFO 2023-12-07 11:15:28,806 pid:41387 /usr/lib/python3/dist-packages/samba/join.py #1687: Setting isSynchronized and dsServiceName
ERROR(<class 'TypeError'>): uncaught exception - argument 1 must be str, not None
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 279, in _run
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain/backup.py", line 903, in run
    smb_conn = smb_sysvol_conn(server, lp, creds)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain/backup.py", line 116, in smb_sysvol_conn
    s3_lp.load(lp.configfile)
Comment 1 Rowland Penny 2024-10-22 08:31:27 UTC
(In reply to Björn Jacke from comment #0)

This works for myself on 4.20.4 if I make one small change, I used:

samba-tool domain backup rename test test.example.com --server=tmpdc1.samdom.example.com --targetdir=/root/backup-backup -U Administrator
Comment 2 Rowland Penny 2024-10-22 13:43:48 UTC
(In reply to Rowland Penny from comment #1)

After thinking about this for a while, I used '-U Administrator@SAMDOM.EXAMPLE.COM', it worked, so I went for broke and tried it with '-U Administrator@samdom.example.com', it still worked. so Bjorn, you might want to try with a later version, if yours was before 4.20.x