Commit Graph

16 Commits

Author SHA1 Message Date
Thomas Lamprecht
618d112b74 pveum: add 'tfa delete' subcommand for deleting user-TFA
Allows a user to straight forward delete TFS over CLI, easier as
telling them to edit some config files, and the API is already there.

Short circuit most params of that API call to undef, as they do not
make sense to expose.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 16:40:05 +02:00
Dominik Csapak
673d2bf267 api: domains: add user/group sync API enpoint
this api call syncs the users and groups from LDAP/AD to the
user.cfg

it also implements a 'full' mode where we first delete all
users/groups from the config and sync them again

the parameter 'enable' controls if newly synced users are 'enabled'
(if no sync parameter handles that)
the parameter 'purge' controls if ACLs get removed for users/groups
that do not exists anymore after

also add this command to pveum

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-21 16:05:15 +01:00
Dominik Csapak
f28a69a018 add realm commands to pveum
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-07 19:50:22 +01:00
Fabian Grünbichler
66d1b61528 pveum: add permissions sub-commands
for user and token commands, and some pretty-printing for regular text
output, since the returned nested hash/dict is not very readable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 21:21:59 +01:00
Thomas Lamprecht
ccaecac13f pveum token: rename 'update' subcommand to 'modify' for consistency
While the 1:1 mapping from API call names is not bad it was now the
unique "PUT" (modify) command having a different name here. Avoid
that for consistency.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-29 21:21:59 +01:00
Fabian Grünbichler
084c149a48 pveum: add 'pveum user token add/update/remove/list'
mapping 1-to-1 to the respective API paths

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 21:21:59 +01:00
Fabian Grünbichler
369851ac6d pveum: add list commands
we already have the API paths, and they make sense to get an overview
over user.cfg contents.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-23 17:42:51 +01:00
Fabian Grünbichler
042eaa3dbd pveum: cleanup outdated use statements
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Dominik Csapak
b34d76e726 replace read_password with param_mapping
use the get_standar_mapping 'pve-password'
then we can get rid of the Term::ReadLine dependency

we use this change to only ask for the password once on
'pveum ticket'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-27 13:27:22 +02:00
Dominik Csapak
765305e210 fix typo in change_passsword
s/passsword/password/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-12 15:07:27 +02:00
Philip Abernethy
1e41cdc903 pveum: introduce sub-commands
use a sub-command structure instead of abbreviated words, where useful.
Keep old commands as aliases.

Signed-off-by: Philip Abernethy <p.abernethy@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-05 15:02:09 +02:00
Dietmar Maurer
e623414a30 PVE/CLI/pveum.pm: call setup_default_cli_env() 2017-05-02 10:39:22 +02:00
Dietmar Maurer
175d238cc9 remove unused inline docs 2016-04-08 07:08:23 +02:00
Dietmar Maurer
085f3e07e1 improve manual page 2015-10-02 10:59:40 +02:00
Dietmar Maurer
98007830ee make read_password a CLIHandler class method
And use new run_cli_handler() method.
2015-10-02 10:45:58 +02:00
Dietmar Maurer
09281ad744 convert pveum into a PVE::CLI class 2015-10-01 16:49:37 +02:00