Using --net=host but can't set/change password inside container

Hello all,

I am using Docker v1.7.1 and running a CentOS 7 container on a host running Ubuntu 14.04. I run the container with --net=host so I have access to the host’s network stack. However, I’ve noticed I can’t change a user’s password inside the container:

$ passwd
Changing password for user root.
New password:
Retype new password:
passwd: System error

Log files are just not there, unfortunately.

For the life of me I can’t place the connection between exposing the host’s network stack (–net=host) and not being able to set or change a user’s password inside the container. I’ve only been able to reproduce when the host is running Ubuntu 14.04 (works fine with CentOS 7 and Debian 8, what is it about Ubuntu 14.04?)

Thank you,

this can be fix by update your host machine’s kernel, kernel should be 3.16