User Namespaces with Cent OS 7

By default, User Namespaces in Cent OS 7 is not enabled by default. This is well documented in the RHEL blog ( TL;DR, this feature is disabled in RHEL because they need to analyze its security impact to make it secure for enterprise use.

In Cent OS 7, you can enable this feature by doing the following:

Step 1: Find out the Kernel Version

Run the following command to find out the kernel version your OS is using:

$ uname -a
Linux 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The kernel version you are looking for is the long string of characters that looks similar to “3.10.0-32722.2.el7.x86_64”

Step 2: Set the Kernel to enable User Namespaces

Run the following command:

$ sudo grubby --args="user_namespace.enable=1" --update-kernel=/boot/vmlinuz-<KERNEL_VERSION>


Step 3: Reboot the machine

$ sudo reboot 


You should be able to run Docker with user namespaces now (:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s