Well, I figured out a workaround. After realizing that pveum is a perl script, I found this post at this post at perlmonks.org which led me to make a small change to the line which reads the password to allow for redirected text to be accepted.
The change is in a subroutine beginning with "my $read_password = sub {" (line 49 on my system) to accept redirection. The blue is from the original file, the red reflects my change.
# diff pveum.original pveum.fixed
49c49
< my $term = new Term::ReadLine ('pveum');
---
> my $term = new Term::ReadLine ('pveum', \*STDIN, \*STDOUT);
# printf "mypassword\nmypassword\n" | pveum passwd myuser@pve
No comments:
Post a Comment