[Samba] Schedule samba backup
Rowland penny
rpenny at samba.org
Thu Aug 29 14:21:26 UTC 2019
On 29/08/2019 13:23, Trenta sis via samba wrote:
> Hi,
>
> I was using samba backup offline, but seems that now is not working, a
> bug is reported.
>
> As a workaround I want to use online backup:
>
> sudo samba-tool domain backup online --targetdir=<output-dir>
> --server=<DC-server> -UAdministrator
>
> Asking password in interative mode works, but I need to automate to
> execute from crontab without asking pwd, how can I do this with
> security?
>
> Thanks
>
I would have suggested using kerberos instead:
samba-tool domain backup online --targetdir=<output-dir>
--server=<DC-server> -k yes
Only problem is, it doesn't work, you still get asked for Administrators
password, this is from this line in domain_backup.py:
smb_conn = smb_sysvol_conn(server, lp, creds)
It looks like the kerberos credentials are not passed down the stack, to
not get asked for the password, you have to use this:
samba-tool domain backup online --targetdir=/root/ --server=dc4
-UAdministrator --password=xxxxxxxxxx
Do you want to store 'Administrators' password in a crontab ?
Rowland
More information about the samba
mailing list