X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FCLI%2Fpveum.pm;h=b12a0bda29bcbbf495a4569676854cd5566a45ff;hb=98007830ee0282a58e6604632df350bf60636748;hp=772ba2949685b1c4f6eff4e532ee9009eb161217;hpb=09281ad74465a7dbc92edfa02463b0d2332a6e98;p=pve-access-control.git diff --git a/PVE/CLI/pveum.pm b/PVE/CLI/pveum.pm index 772ba29..b12a0bd 100755 --- a/PVE/CLI/pveum.pm +++ b/PVE/CLI/pveum.pm @@ -21,6 +21,18 @@ use PVE::CLIHandler; use base qw(PVE::CLIHandler); +sub read_password { + # return $ENV{PVE_PW_TICKET} if defined($ENV{PVE_PW_TICKET}); + + my $term = new Term::ReadLine ('pveum'); + my $attribs = $term->Attribs; + $attribs->{redisplay_function} = $attribs->{shadow_redisplay}; + my $input = $term->readline('Enter new password: '); + my $conf = $term->readline('Retype new password: '); + die "Passwords do not match.\n" if ($input ne $conf); + return $input; +} + our $cmddef = { ticket => [ 'PVE::API2::AccessControl', 'create_ticket', ['username'], undef, sub {