password for user bash

VovanSSS

New Member
Sep 2, 2016
1
0
1
30
Hello, how to change the user password in bash?

It is necessary to automate this through a script, which will be preceded by parameters

root@pve:~# pveum passwd test@pve -password=4780898563nN
Option password does not take an argument
400 unable to parse option
pveum passwd <userid>
 
if you use pveum you have to input the password interactively
if you want to pass the password as an argument you have to use pvesh / api

example:
Code:
pvesh set /access/password --userid "testuser@pve" --password "blub"