juju run is inconsistent as who the commands run as
Bug #1881491 reported by
James Troup
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
juju run --help (2.7.6-
If the target is a machine, the command is run as the "root" user on
the remote machine.
However this appears to be the almost exact opposite of what actually happens:
* --application => root
* --unit => root
* --machine => ubuntu
* --all => ubuntu
At an absolute minimum, the documentation must match reality. After that, I think it may be
worth reviewing why these run as different users and whether the principle-
is worth whatever the perceived gain is.
Changed in juju: | |
milestone: | 2.8.1 → 2.8.2 |
Changed in juju: | |
milestone: | 2.9-beta1 → 2.9-rc1 |
To post a comment you must log in.
Interestingly, the help doc was changed back in 2017
https:/ /github. com/juju/ juju/pull/ 7090
due to this bug being raised
https:/ /bugs.launchpad .net/juju/ +bug/1628593
So it seems at one point juju run was executing as "ubuntu", then switched to "root".
And now for machines it is "ubuntu" again.
IMO running as an unprivileged user is better and you can always sudo if needed.
There's also been a few discussions/bugs about people not liking the "ubuntu" user
eg https:/ /discourse. juju.is/ t/ubuntu- w-o-the- ubuntu- user/271
One request was for there to be a "juju" user instead.