Ask Your Question
2

Selinux stops password change in systemd-nspawn container

asked 2014-12-21 16:05:03 -0600

2bdkid gravatar image

updated 2014-12-21 22:17:32 -0600

mether gravatar image

I have a Fedora 21 minimal install in a systemd-nspawn container and when I try to set the root password Selinux stops it from being set. This is from the details window:

SELinux is preventing passwd from read access on the lnk_file run.

Plugin: catchall_labels you want to allow passwd to have read access on the run lnk_fileIf you want to allow passwd to have read access on >the run lnk_file You need to change the label on run

semanage fcontext -a -t FILE_TYPE 'run'

where FILE_TYPE is one of the following: admin_home_t, bin_t, boot_t, cert_t, device_t, devlog_t, etc_runtime_t, >etc_t, file_context_t, fonts_cache_t, fonts_t, home_root_t, ld_so_t, lib_t, locale_t, man_cache_t, man_t, net_conf_t, >proc_t, root_t, rpm_script_tmp_t, security_t, selinux_config_t, shell_exec_t, src_t, sssd_var_lib_t, sysfs_t, >system_conf_t, system_db_t, textrel_shlib_t, tmp_t, user_home_dir_t, usr_t, var_run_t, var_t. Then execute: restorecon -v 'run'

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-12-21 19:22:34 -0600

2bdkid gravatar image

I have solved this by running:

sudo semanage fcontext -a -t svirt_sandbox_file_t "/path/to/container(/.*)?"

sudo restorecon -R /path/to/container/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-12-21 16:05:03 -0600

Seen: 603 times

Last updated: Dec 21 '14