From the course: Linux System Engineer: Network Filesystems Using NFS and Samba

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Configure SELinux for Samba

Configure SELinux for Samba - Red Hat Enterprise Linux Tutorial

From the course: Linux System Engineer: Network Filesystems Using NFS and Samba

Start my 1-month free trial

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…

Contents