课程: Linux System Engineer: Network Filesystems Using NFS and Samba

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Configure SELinux for Samba

Configure SELinux for Samba

- [Narrator] There are multiple SELinux booleans and types that we may have to modify in order to have a working Samba server. We can take a look at these now. The best way to know what is necessary is to read the example configuration file installed with the Samba server. Be sure you're logged into rhhost1 with the terminal open. Type into the terminal sudo vi /etc/samba/smb.conf/example and hit Enter. Near the top, it explains the various booleans. If you want to run your Samba server as a primary domain controller, and use the useradd and groupadd commands, then turn the Samba domain controller boolean on. If you want to share home directories, you need to turn on the samba_enable_home_dirs boolean. Whenever you create a parent directory that will be shared via Samba, you need to change its security context to samba_share_t. You can either do this temporarily with changecon, or you can change the security policy itself with the semanage command. If you only change the context with…

内容