我将原始博客帖子的详细说明和来自手册页的最新指令(使用dnf而不是yum)结合在一起。
# sudo dnf -y --releasever=24 --installroot=$HOME/fedora-24 --disablerepo='*' --enablerepo=fedora --enablerepo=updates install systemd passwd dnf fedora-release vim-minimal
# sudo systemd-nspawn -D fedora-24
Spawning container fedora-24 on /home/alan-sysop/fedora-24
Press ^] three times within 1s to kill container.
-bash-4.3# passwd
Changing password for user root.
New password:
Retype new password:结果:
passwd: Authentication token manipulation error和一个AVC弹出,即SELinux错误。声明称,passwd不允许取消(替换) /etc/passwd链接。“疑难解答”按钮中的一个建议是,我可以将标签passwd_file_t分配给/etc/passwd。
怎么了,我该怎么解决呢?
发布于 2021-11-26 09:36:18
同样的问题,一个引导的分OS 8用户空间。
已查明的问题
[root@- bootstrapped_base_systems]# ls -Z centos8/bin/passwd
system_u:object_r:passwd_exec_t:s0 centos8/bin/passwd
[root@- bootstrapped_base_systems]# ls -Z centos8/etc/passwd
unconfined_u:object_r:etc_t:s0 centos8/etc/passwd(在这种情况下,etc/passwd很好)
固定在
[root@- bootstrapped_base_systems]# chcon -v unconfined_u:object_r:etc_t:s0 centos8/bin/passwd
changing security context of 'centos8/bin/passwd'经验证与
[root@- bootstrapped_base_systems]# ls -Z centos8/bin/passwd
unconfined_u:object_r:etc_t:s0 centos8/bin/passwdhttps://unix.stackexchange.com/questions/308687
复制相似问题