summaryrefslogtreecommitdiff
path: root/python/samba/netcmd/computer.py
AgeCommit message (Collapse)AuthorFilesLines
2021-06-17netcmd: Incorrect arguments to Exception constructorGarming Sam1-1/+1
Discovered by Semmle code analysis: https://lgtm.com/projects/g/samba-team/samba Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Thu Jun 17 05:12:03 UTC 2021 on sn-devel-184
2020-10-02python2 reduction: Merge remaining compat code into commonDavid Mulder1-1/+1
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-01samba-tool computer: rename 'computer create' to 'computer add'Jule Anger1-13/+14
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-09-04Fixed arrow keys typo to the computer move command utilityHezekiah1-1/+1
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-01-21samba-tool: add -b/--base-dn option to computer list commandJule Anger1-2/+10
With this option it's e.g. possible to list the computers of a specify OU or computers which are located under a different specific place in the AD. Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-21samba-tool: add --full-dn option to computer list commandJule Anger1-1/+14
With this option the command lists the computers distringuished names instead of the sAMAccountNames. Signed-off-by: Jule Anger <ja@sernet.de> Reviewed-by: Björn Baumbach <bb@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-29samba-tool {user,group,computer,contact} show: avoid base64 encoded strings ↵Björn Baumbach1-3/+2
if possible Be more user friendly and use clear text argument strings if possible. Signed-off-by: Björn Baumbach <bb@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-04samba-tool computer: add 'edit' command to edit an AD computer objectBjörn Baumbach1-1/+122
Similar to the samba-tool user edit command. Signed-off-by: Björn Baumbach <bb@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-04samba-tool: fix format of command description (help messages)Björn Baumbach1-3/+3
Need to quote the backslash '\'. Signed-off-by: Björn Baumbach <bb@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-03python/samba/netcmd: changes for samab.tests.samba_tool.computerNoel Power1-1/+1
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-24PEP8: fix E712: comparison to False should be 'if cond is False:' or 'if not ↵Joe Guo1-1/+1
cond:' Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E226: missing whitespace around arithmetic operatorJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E202: whitespace before ')'Joe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E201: whitespace after '('Joe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E127: continuation line over-indented for visual indentJoe Guo1-4/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E123: closing bracket does not match indentation of opening ↵Joe Guo1-8/+8
bracket's line Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-14samba-tool computer: fix wrong computer container in help messageBjörn Baumbach1-2/+2
CN=Users --> CN=Computers Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Björn Jacke <bjacke@samba.org>
2018-05-12samba_tool: make exception handling statements py2/py3 compatibleNoel Power1-3/+3
Fix some missed conversions of except Exception, e: to except Exception as e: Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-04-06samba-tool: Use same method for removing trailing $ as elsewhere in the toolAndrew Bartlett1-2/+8
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Apr 6 09:30:14 CEST 2018 on sn-devel-144
2018-04-06samba-tool: Escape username and computername in ldb search filterAndrew Bartlett1-2/+4
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-06samba-tool: improve computer management commandsJoe Guo1-3/+199
This pathch is based on Björn Baumbach's work: 1. Add `--ip-address` option for create subcommand, to allow user set DNS A or AAAA records while creating the computer. 2. Delete above DNS records while deleting the computer. 3. Add `--service-principal-name` option for create command, to allow user set `servicePrincipalName` while creating the computer. 4. Tests. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-06samba-tool: implement computer management commandsBjörn Baumbach1-0/+382
Usage: samba-tool computer <subcommand> Computer management. Available subcommands: create - Create a new computer. delete - Delete a computer. list - List all computers. move - Move a computer to an organizational unit/container. show - Display a computer AD object Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>