「SELinux を Ubuntu にインストールする」の版間の差分
提供: セキュリティ
行15: | 行15: | ||
% sudo selinux-activate | % sudo selinux-activate | ||
% sudo shutdown -r now | % sudo shutdown -r now | ||
+ | % check-selinux-installation | ||
</syntaxhighlight> | </syntaxhighlight> | ||
行86: | 行87: | ||
/usr/share/selinux-basics/tests/25_udev_relabel.py | /usr/share/selinux-basics/tests/25_udev_relabel.py | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | == check-selinux-installation がエラーになる例 == | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | kaworu@ubuntu:~$ sudo check-selinux-installation | ||
+ | Traceback (most recent call last): | ||
+ | File "/usr/sbin/check-selinux-installation", line 33, in <module> | ||
+ | results += test.test() | ||
+ | File "/usr/share/selinux-basics/tests/24_fsckfix.py", line 24, in test | ||
+ | raise IOError("/etc/default/rcS not found, is this Debian?") | ||
+ | OSError: /etc/default/rcS not found, is this Debian? | ||
+ | </syntaxhighlight> | ||
+ | |||
== 関連項目 == | == 関連項目 == | ||
* [[SELinux]] | * [[SELinux]] |
2019年8月16日 (金) 23:01時点における版
目次
概要
インストール
% sudo apt-get install -y selinux-basics selinux-policy-default selinux-policy-dev selinux-policy-src selinux-utils % sudo selinux-activate % sudo shutdown -r now % check-selinux-installation
下記の方法は、すでに古いです。selinux のパッケージは、なくなったようです。
% sudo apt-get install selinux % sudo shutdown -r now
使い方
SELinux をご参照ください。
selinux-activate の実行例
kaworu@ubuntu:~$ sudo selinux-activate Activating SE Linux Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.0.0-25-generic Found initrd image: /boot/initrd.img-5.0.0-25-generic Found linux image: /boot/vmlinuz-5.0.0-20-generic Found initrd image: /boot/initrd.img-5.0.0-20-generic Found linux image: /boot/vmlinuz-5.0.0-17-generic Found initrd image: /boot/initrd.img-5.0.0-17-generic Found linux image: /boot/vmlinuz-5.0.0-16-generic Found initrd image: /boot/initrd.img-5.0.0-16-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done SE Linux is activated. You may need to reboot now.
インストールされるファイル
selinux-basics
kaworu@ubuntu:~$ sudo dpkg -L selinux-basics /. /usr /usr/sbin /usr/sbin/check-selinux-installation /usr/sbin/postfix-nochroot /usr/sbin/selinux-activate /usr/sbin/selinux-config-enforcing /usr/sbin/selinux-policy-upgrade /usr/share /usr/share/doc /usr/share/doc/selinux-basics /usr/share/doc/selinux-basics/README /usr/share/doc/selinux-basics/changelog.gz /usr/share/doc/selinux-basics/copyright /usr/share/man /usr/share/man/man8 /usr/share/man/man8/check-selinux-installation.8.gz /usr/share/man/man8/postfix-nochroot.8.gz /usr/share/man/man8/selinux-config-enforcing.8.gz /usr/share/man/man8/selinux-policy-upgrade.8.gz /usr/share/python3 /usr/share/python3/runtime.d /usr/share/python3/runtime.d/selinux-basics.rtupdate /usr/share/selinux-basics /usr/share/selinux-basics/tests /usr/share/selinux-basics/tests/00_selinuxenabled.py /usr/share/selinux-basics/tests/01_verify_init.py /usr/share/selinux-basics/tests/02_verify_slash_selinux.py /usr/share/selinux-basics/tests/10_test_kernel_processes.py /usr/share/selinux-basics/tests/20_old-style-ttys.py /usr/share/selinux-basics/tests/21_pam.py /usr/share/selinux-basics/tests/22_postfix.py /usr/share/selinux-basics/tests/24_fsckfix.py /usr/share/selinux-basics/tests/25_udev_relabel.py
check-selinux-installation がエラーになる例
kaworu@ubuntu:~$ sudo check-selinux-installation Traceback (most recent call last): File "/usr/sbin/check-selinux-installation", line 33, in <module> results += test.test() File "/usr/share/selinux-basics/tests/24_fsckfix.py", line 24, in test raise IOError("/etc/default/rcS not found, is this Debian?") OSError: /etc/default/rcS not found, is this Debian?