Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Can you show us, the commands. Is it simply unshare -Un. If I simply type that I get an error message unshare: unshare failed: Operation not permitted. So what am I missing. Edit the question to make it clearer. Commented Nov 5, 2020 at 22:35
  • @ctrl-alt-delor I am not sure why you got this error, I would guess your OS does not have the user namespace activated. You could verify by running ls /proc/self/ns. On mine, I have a file called user. Commented Nov 9, 2020 at 0:35
  • Yes. I have a file called user, in there. The namespaces are enabled in the kernel (I am running docker). However unshare -Un just fives me the error as stated above. Are you expecting it to be run as root (sudo)? Commented Nov 9, 2020 at 17:34
  • 1
    You’re probably running Debian. Unprivileged user namespaces have to be enabled by running sysctl kernel.unprivileged_userns_clone=1. See lwn.net/Articles/673597 Commented Nov 10, 2020 at 14:28