1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

592 Commits

Author SHA1 Message Date
David Mulder
d6f9172c92 samba-tool: Add a gpo command for removing VGP Files Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Feb  8 23:36:57 UTC 2021 on sn-devel-184
2021-02-08 23:36:57 +00:00
David Mulder
c1d67b2742 samba-tool: Test gpo manage files remove command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-02-08 22:33:14 +00:00
David Mulder
6334307ae7 samba-tool: Add a gpo command for adding VGP Files Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-02-08 22:33:14 +00:00
David Mulder
a974cd94af samba-tool: Test gpo manage files add command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-02-08 22:33:14 +00:00
David Mulder
a786e30fda samba-tool: Add a gpo command for listing VGP Files Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-02-08 22:33:14 +00:00
David Mulder
926cdeb10f samba-tool: Test gpo manage files list command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-02-08 22:33:14 +00:00
David Mulder
709a6d6491 samba-tool: Add a gpo command for removing VGP Symbolic Link Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 27 07:32:03 UTC 2021 on sn-devel-184
2021-01-27 07:32:03 +00:00
David Mulder
5794c670ff samba-tool: Test gpo manage symlink remove command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
3fc89829a9 samba-tool: Add a gpo command for adding VGP Symbolic Link Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
7b2ecefd55 samba-tool: Test gpo manage symlink add command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
7e70d72d97 samba-tool: Add a gpo command for listing VGP Symbolic Link Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
b9cba18528 samba-tool: Test gpo manage symlink list command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
Björn Baumbach
e84f8bdff5 samba-tool: Optionally hide disabled/expired accounts in "group listmembers"
--hide-expired        Do not list expired group members
  --hide-disabled       Do not list disabled group members

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 15 16:34:11 UTC 2021 on sn-devel-184
2021-01-15 16:34:11 +00:00
Björn Baumbach
7dad13cc86 samba-tool: Optionally hide disabled/expired accounts in "user list"
--hide-expired        Do not list expired user accounts
  --hide-disabled       Do not list disabled user accounts

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
2021-01-15 15:24:37 +00:00
David Mulder
ef5ea147dd samba-tool: Add a gpo command for setting smb.conf Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
2705d39bff samba-tool: Test gpo smb.conf set command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
fff3e0eb6a samba-tool: Add a gpo command for listing smb.conf Group Policies
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
f74dea08be samba-tool: Test gpo smb.conf list command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
111f07fd58 samba-tool: Add a gpo command for listing Security Group Policies
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
aba8ece11d samba-tool: Test gpo Security list
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
eea46a38eb samba-tool: Add a gpo command for setting Security Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
5b49e0ac71 samba-tool: Test gpo Security set command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
f509550f87 samba-tool: Add a gpo command for removing Sudoers Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
f67a3644f4 samba-tool: Test gpo Sudoers remove command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
5f9d2456fb samba-tool: Add a gpo command for adding Sudoers Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
b0ccebd3ee samba-tool: Test gpo Sudoers add command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
b402c7642c samba-tool: Add a gpo command for listing Sudoers Group Policies
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
David Mulder
6f1374844c samba-tool: Test gpo Sudoers list command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-12-09 17:38:28 +00:00
Douglas Bagnall
e253c45c6d samba-tool gpo: use common attr_default
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2020-12-09 16:00:39 +00:00
Douglas Bagnall
816dee1a13 samba-tool drs: move attr_default to common
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2020-12-09 16:00:39 +00:00
Douglas Bagnall
2c48e90fad samba-tool pso uses common timestamp functions
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2020-12-09 16:00:39 +00:00
Douglas Bagnall
c8d3547c5f samba-tool domain: move timestamp functions to common
Other tools use identical functions, and they too can use common.py

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2020-12-09 16:00:39 +00:00
Andrew Bartlett
8ad82ae661 samba-tool: Give better error information when the 'domain backup restore' fails with a duplicate SID
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14575

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Thu Nov 26 21:15:40 UTC 2020 on sn-devel-184
2020-11-26 21:15:40 +00:00
Andrew Bartlett
15609cb919 samba-tool domain backup: Confirm the sidForRestore we will put into the backup is free
Otherwise the administrator might only find there is a problem once they
attempt to restore the domain!

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14575
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-11-26 06:52:40 +00:00
Andrew Bartlett
d79218dbba samdb: Add samdb.domain_netbios_name()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-11-11 01:15:39 +00:00
Isaac Boukris
baf4e2930e Use the new CreateTrustedDomainRelax()
Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-11-06 10:02:35 +00:00
Björn Baumbach
0bc93500a8 samba-tool: add new "user unlock" command
Can be used to unlock a user when the badPwdCount has been reached.

Introduces SamDB error classes, as suggested by
Douglas Bagnall <douglas.bagnall@catalyst.net.nz> - thanks!
This helps to handle expected failures.
Tracebacks of really unexpected failures will not be hidden.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-11-03 22:55:37 +00:00
Andreas Schneider
76db796181 python: Create targetdir recursively
This fixes `make test` in a release tarball.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-10-22 16:05:30 +00:00
David Mulder
a3cd315321 python2 reduction: Merge remaining compat code into common
The remaining compat code (get_string, get_bytes,
cmp) are useful helper routines which we should
simply merge into common (especially since there
is some duplication here).

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Fri Oct  2 14:49:36 UTC 2020 on sn-devel-184
2020-10-02 14:49:36 +00:00
Jule Anger
f38336ac0e samba-tool contact: rename 'contact create' to 'contact add'
Keep 'contact create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:41 +00:00
Jule Anger
90988ff69f samba-tool group: add 'group create' as synonym for 'group add'
Add 'group create' command for a symmetric set of
samba-tool subcommands

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:41 +00:00
Jule Anger
1703ca1136 samba-tool computer: rename 'computer create' to 'computer add'
Keep 'computer create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:40 +00:00
Jule Anger
95ba8a3f8c samba-tool user: rename 'user create' to 'user add'
Keep 'user create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:40 +00:00
Jule Anger
419e75cc38 samba-tool ou: rename 'ou create' to 'ou add'
Keep 'ou create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:40 +00:00
Jule Anger
bf04cb3b7a samba-tool contact: add new contact 'rename' command
Usage: samba-tool contact rename <contactname> [options]

Rename a contact and related attributes.

This command allows to set the contact's name related attributes.

Use an empty attribute value to remove the specified attribute.

The contactname specified on the command is the CN.

Example1:
samba-tool contact rename "John Doe" --surname=Bloggs \\
    --force-new-cn=John

Example1 shows how to change the surname ('sn' attribute) of a contact
'John Doe' to 'Bloggs' and change the CN to 'John' on the local server.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:40 +00:00
Jule Anger
4b06ff7ffc samba-tool group: add new group 'rename' command
Usage: samba-tool group rename <groupname> [options]

Rename a group and related attributes.

This command allows to set the group's name related attributes.

Use an empty attribute value to remove the specified attribute.

The groupname specified on the command is the sAMAccountName.

Example1:
samba-tool group rename employees --samaccountname=staff

Example1 shows how to change the sAMAaccountName of a group 'employees' to
'staff' on the local server.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:39 +00:00
Björn Baumbach
891af24054 samba-tool user: add new user 'rename' command
Usage: samba-tool user rename <username> [options]

Rename a user and related attributes.

This command allows to set the user's name related attributes. The user's
CN will be renamed automatically.
The user's new CN will be made up by combining the given-name, initials
and surname. A dot ('.') will be appended to the initials automatically.
Use the --force-new-cn option to specify the new CN manually.

The username specified on the command is the sAMAccountName.

Example1:
samba-tool user rename johndoe --surname='Bloggs'

Example1 shows how to change the surname of a user 'johndoe' to 'Bloggs' on
the local server. The user's CN will be renamed automatically, based on
the given name, initials and surname.

Pair-Programmed-With: Jule Anger <ja@sernet.de>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-10-01 01:18:39 +00:00
Hezekiah
bd9f64d19d Fixed arrow keys typo to the computer move command utility
Signed-off-by: Hezekiah <hezekiahmaina3@gmail.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Sep  4 16:57:30 UTC 2020 on sn-devel-184
2020-09-04 16:57:30 +00:00
David Mulder
07ce480888 samba-tool: Create unix user with modified template homedir
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-09-02 09:11:29 +00:00
Andreas Schneider
6f552204d4 s3:client: Turn off smb signing for message op
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-08-19 16:22:42 +00:00