[RFE] juju change-user-password non interactively
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
juju change-
----
#!/bin/bash
JUJU_USER=$1
JUJU_PASSWORD=
echo $JUJU_PASSWORD | juju change-
echo "This is your password: $JUJU_PASSWORD" | mutt -s "New password for user $JUJU_USER" ${JUJU_
----
[workaround]
Expect script:
```
#!/usr/bin/expect
set timeout 20
set juju_user [lindex $argv 0]
set juju_password [lindex $argv 1]
spawn juju change-
expect "new password:" { send "$juju_password\r" }
expect "type new password again:" { send "$juju_password\r" };
interact
```
Agreed that this would be nicer if more easily scriptable. Adding to the wishlist, as there is a documented workaround. (Thank you for documenting it!)