netcmd: Add no-secrets option to domain backups
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 5 Jul 2018 02:33:22 +0000 (14:33 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 10 Jul 2018 02:42:10 +0000 (04:42 +0200)
commit03c7d1e91efe9ba932334f32102230fc9481eb0b
tree8f0ea25915a9c845c318ef362296765d229d1c6f
parent47e57249717677aed0afd9564cc349a70e125191
netcmd: Add no-secrets option to domain backups

By default we include all the domain's secrets in the backup file. This
patch adds an extra option to exclude these secrets. In particular, this
is for the use case of creating a lab domain (where you might not feel
comfortable with the secrets for all your users being present).

Mostly this just involves passing the correct option to the join/clone.
I've also made sure that a password is also set for the Admin user
(samba does seem to start up without one set, but this behaviour is
closer to what happens during a provision).

The tests have been extended to use the new option, and to assert that
secrets are/aren't included as expected for some of the builtin testenv
users.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/domain_backup.py
python/samba/tests/domain_backup.py