[PATCH] samba-tools: add computer subcommand

Bjoern Baumbach bb at sernet.de
Thu Feb 8 09:00:42 UTC 2018


On 02/08/2018 12:18 AM, Andrew Bartlett wrote:
> Any chance you could help out and cut it down for him?  I would be
> great to have a hand getting this in.

I've nearly completed the computer subcommand. I'm just working on the

> Originally this task started as the create/delete task, and in
> hindsight that much should have been proposed for comment first. 

This is the current set:

# bin/samba-tool computer
Usage: samba-tool computer <subcommand>

Computer management.

  -h, --help  show this help message and exit

Available subcommands:
  create  - Create a new computer.
  delete  - Delete a computer.
  list    - List all computers.
  move    - Move an computer to an organizational unit/container.
  show    - Display an computer AD object.
For more help on a specific subcommand, please type: samba-tool computer
<subcommand> (-h|--help)

> The challenge was that simple re-direction didn't work (confusing help,
> trailing $) and suddenly this became a big cut/paste job. 

Yes, I thought some time about the trailing-$ issue. I decided to make
this (magically) optional:

The list command lists the whole sAMAccountName, e.g. pc1$.

If you use create pc1, it will create pc1$. If you create pc$, it will
also create pc$. If you try to create pc$$, it will throw an error,
becuase pc$$ is also not allowed by the windows RSAT tools.

The move command works like the move command in the user, computer and
OU sub command, which I've provided on January 25th. In the computer sub
command also with or without the trailing $.

Best regards,

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

Besuchen Sie die verinice.XP 2018 in Berlin,
Anwenderkonferenz für Informationssicherheit
vom 21.-23.03.2018 im Sofitel Kurfürstendamm
Info & Anmeldung hier: http://veriniceXP.org

More information about the samba-technical mailing list