Skip to main content
Added explanations for my position, reflecting discourse below.
Source Link

I thought @Peter Van Heusden'sPeterVanHeusden's answer was precise and thorough (also kind, since as he said, there's an argument to be saidmade that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

@murumuru corrected those, but in so doing s/he also made a change which I feel needs to be rolled back:

  1. The question dealt with LXD; Peter Van HeusdenPeterVanHeusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they helpand edited it to understand which parts ofa simple $ prompt. Also note that, as KazWolfe mentions below, PeterVanHeusden specified in the example worktext which part works in which context. However, I object to the edit on two grounds: (a) it makes the example less clear, rather than more so (a graphic cue really helps there), and (b) the $ prompt doesn't appear inside a container, because by default one executes commands as root in it (including bash, to get a shell into it); this just adds to the confusion, and the space saved by shrinking the prompt does't help in this case (there's more than enough space in the answer).
  1. A sudo call was used in the example to run the lxcLXD command-line tool lxc, which is redundant. In practice, I believe it therefore shouldn't be used (hence I edited it out; again, I was thinking it's a roll-back), but as an edit it might be considered superficial -- I'll be glad to hear what you thinkFrom LinuxContainers.org:

The package creates a new "lxd" group which contains all users allowed to talk to lxd over the local unix socket. All members of the "admin" and "sudoers" groups are automatically added. If your user isn't a member of one of these groups, you'll need to manually add your user to the "lxd" group.

This implies that any user able to escalate sudo should already be able to call lxc; moreover, the preferred way of gaining privileges is to add a user to the "lxd" group, rather than using sudo.

Keep in mind the following two points: (a) using sudo for tasks which don't require it is a bad habit to encourage. (b) A user following this example has already installed LXD and launched a container. All tutorials I've seen, including those on Ubuntu Insights written by Stéphane Graber (project head), use unprivileged containers that don't require sudo. If for some reason users find themselves in a situation where sudo is required to manage LXD, they quite surly already know why and how that happened.

Hence, I contend that almost everyone, and most particularly novices, are safe to remove the sudo call from the example, and therefore it's better not to include it.

I thought @Peter Van Heusden's answer was precise and thorough (also kind, since as he said, there's an argument to be said that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

@muru corrected those, but in so doing s/he also made a change which I feel needs to be rolled back:

  1. The question dealt with LXD; Peter Van Heusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they help to understand which parts of the example work in which context.
  1. A sudo call was used in the example to run the lxc command-line tool, which is redundant. In practice, I believe it therefore shouldn't be used (hence I edited it out; again, I was thinking it's a roll-back), but as an edit it might be considered superficial -- I'll be glad to hear what you think.

I thought PeterVanHeusden's answer was precise and thorough (also kind, since as he said, there's an argument to be made that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

muru corrected those, but in so doing s/he also made a change which I feel needs to be rolled back:

  1. The question dealt with LXD; PeterVanHeusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", and edited it to a simple $ prompt. Also note that, as KazWolfe mentions below, PeterVanHeusden specified in the text which part works in which context. However, I object to the edit on two grounds: (a) it makes the example less clear, rather than more so (a graphic cue really helps there), and (b) the $ prompt doesn't appear inside a container, because by default one executes commands as root in it (including bash, to get a shell into it); this just adds to the confusion, and the space saved by shrinking the prompt does't help in this case (there's more than enough space in the answer).
  1. A sudo call was used in the example to run the LXD command-line tool lxc, which is redundant. From LinuxContainers.org:

The package creates a new "lxd" group which contains all users allowed to talk to lxd over the local unix socket. All members of the "admin" and "sudoers" groups are automatically added. If your user isn't a member of one of these groups, you'll need to manually add your user to the "lxd" group.

This implies that any user able to escalate sudo should already be able to call lxc; moreover, the preferred way of gaining privileges is to add a user to the "lxd" group, rather than using sudo.

Keep in mind the following two points: (a) using sudo for tasks which don't require it is a bad habit to encourage. (b) A user following this example has already installed LXD and launched a container. All tutorials I've seen, including those on Ubuntu Insights written by Stéphane Graber (project head), use unprivileged containers that don't require sudo. If for some reason users find themselves in a situation where sudo is required to manage LXD, they quite surly already know why and how that happened.

Hence, I contend that almost everyone, and most particularly novices, are safe to remove the sudo call from the example, and therefore it's better not to include it.

Corrected a mistake I had in perception (muru hasn't made a change I thought s/he did).
Source Link

I'd like to ask for reconsideration on an edit I suggested; based on this meta question, I believe Meta is where such a request belongs.


The post in question is an answer to a question I asked, What does the double-hyphen do in `lxc exec`.

I thought @Peter Van Heusden's answer was precise and thorough (also kind, since as he said, there's an argument to be said that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

@muru corrected those, but in so doing s/he also made two changesa change which I feel needneeds to be rolled back:

  1. The question dealt with LXD; Peter Van Heusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they help to understand which parts of the example work in which context.

  2. muru also added a sudo call to run the lxc command-line tool, which is redundant (hence, I believe shouldn't be done in practice; but disconnected from that, in any case it shouldn't have been edited).

    The question dealt with LXD; Peter Van Heusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they help to understand which parts of the example work in which context.

Additionally, (something I mistakenly thought muru changed, but was in the original)

  1. A sudo call was used in the example to run the lxc command-line tool, which is redundant. In practice, I believe it therefore shouldn't be used (hence I edited it out; again, I was thinking it's a roll-back), but as an edit it might be considered superficial -- I'll be glad to hear what you think.

I believe the two reviewers who rejected my edit (to roll these changes back, while keeping the changes to format) might not have looked at the edit history, nor realized that it's (now, partially) a roll-back. I might be wrong, but I believe the answer is better without thesewith the two changes I suggested. (To me it is, in any case.)

I'd like to ask for reconsideration on an edit I suggested; based on this meta question, I believe Meta is where such a request belongs.


The post in question is an answer to a question I asked, What does the double-hyphen do in `lxc exec`.

I thought @Peter Van Heusden's answer was precise and thorough (also kind, since as he said, there's an argument to be said that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

@muru corrected those, but in so doing s/he also made two changes which I feel need to be rolled back:

  1. The question dealt with LXD; Peter Van Heusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they help to understand which parts of the example work in which context.

  2. muru also added a sudo call to run the lxc command-line tool, which is redundant (hence, I believe shouldn't be done in practice; but disconnected from that, in any case it shouldn't have been edited).

I believe the two reviewers who rejected my edit (to roll these changes back, while keeping the changes to format) might not have looked at the edit history, nor realized that it's a roll-back. I might be wrong, but I believe the answer is better without these two changes. (To me it is, in any case.)

I'd like to ask for reconsideration on an edit I suggested; based on this meta question, I believe Meta is where such a request belongs.


The post in question is an answer to a question I asked, What does the double-hyphen do in `lxc exec`.

I thought @Peter Van Heusden's answer was precise and thorough (also kind, since as he said, there's an argument to be said that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

@muru corrected those, but in so doing s/he also made a change which I feel needs to be rolled back:

  1. The question dealt with LXD; Peter Van Heusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they help to understand which parts of the example work in which context.

Additionally, (something I mistakenly thought muru changed, but was in the original)

  1. A sudo call was used in the example to run the lxc command-line tool, which is redundant. In practice, I believe it therefore shouldn't be used (hence I edited it out; again, I was thinking it's a roll-back), but as an edit it might be considered superficial -- I'll be glad to hear what you think.

I believe the two reviewers who rejected my edit (to roll these changes back, while keeping the changes to format) might not have looked at the edit history, nor realized that it's (now, partially) a roll-back. I might be wrong, but I believe the answer is better with the two changes I suggested. (To me it is, in any case.)

Source Link

Suggested edit to "What does the double-hyphen do in `lxc exec`"

I'd like to ask for reconsideration on an edit I suggested; based on this meta question, I believe Meta is where such a request belongs.


The post in question is an answer to a question I asked, What does the double-hyphen do in `lxc exec`.

I thought @Peter Van Heusden's answer was precise and thorough (also kind, since as he said, there's an argument to be said that my question was a duplicate, only I haven't realized what's actually behind the behavior I was seeing), but it did have some formatting issues.

@muru corrected those, but in so doing s/he also made two changes which I feel need to be rolled back:

  1. The question dealt with LXD; Peter Van Heusden made an example involving a shell in both the host and the container, and used the shell prompt to distinguish the two (in a container, typically one gets a root@container:~# prompt). muru felt it was "unnecessarily long", but I actually think they help to understand which parts of the example work in which context.

  2. muru also added a sudo call to run the lxc command-line tool, which is redundant (hence, I believe shouldn't be done in practice; but disconnected from that, in any case it shouldn't have been edited).

I believe the two reviewers who rejected my edit (to roll these changes back, while keeping the changes to format) might not have looked at the edit history, nor realized that it's a roll-back. I might be wrong, but I believe the answer is better without these two changes. (To me it is, in any case.)