容器里面修改root的密码的问题


passwd root

passwd: unconfined_u:unconfined_r:unconfined_t:s0 is not authorized to change the password of root

想修改容器的密码。但是提示如上,已经把selinux设置成disable,但是没生效。

cat /etc/selinux/config

This file controls the state of SELinux on the system.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - No SELinux policy is loaded.

SELINUX=disabled

SELINUXTYPE= can take one of these two values:

targeted - Targeted processes are protected,

mls - Multi Level Security protection.

SELINUXTYPE=targeted

另外

setenforce 0

setenforce: setenforce() failed
也提示这个。
有没有哪位遇到过,有什么解决方法没?
已邀请:

徐新坤 - 京东商城-TIG-JDOS团队

赞同来自:


可以试试禁用容器的宿主机的selinux。然后reboot下宿主机再看看。
参看(http://comments.gmane.org/gman ... l/5476)

要回复问题请先登录注册