Check /var/log/audit/audit.log grep mount /var/log/audit/audit.log
SELinux for Sysadmins
Share home directories through NFS
If it is a SELinux problem:
getsebool -a | grep home ftp_home_dir --> off httpd_enable_homedirs --> on openvpn_enable_homedirs --> off samba_create_home_dirs --> off samba_enable_home_dirs --> off spamd_enable_home_dirs --> on use_nfs_home_dirs --> off use_samba_home_dirs --> off
SELinux for Sysadmins
Share home directories through NFS
If it is a SELinux problem:
getsebool -a | grep home ftp_home_dir --> off httpd_enable_homedirs --> on openvpn_enable_homedirs --> off samba_create_home_dirs --> off samba_enable_home_dirs --> off spamd_enable_home_dirs --> on use_nfs_home_dirs --> off use_samba_home_dirs --> off
SELinux for Sysadmins
Share home directories through NFS
If it is a SELinux problem:
setsebool use_nfs_home_dirs on
SELinux for Sysadmins
Share home directories through NFS
If it is a SELinux problem:
setsebool -P use_nfs_home_dirs on
Real world example 1
Share home directories through NFS
setsebool -P use_nfs_home_dirs on
Real world example 1
Share home directories through NFS
setsebool -P use_nfs_home_dirs on
Share home directories through SaMBa
Real world example 1
Share home directories through NFS
setsebool -P use_nfs_home_dirs on
Share home directories through SaMBa
setsebool -P use_samba_home_dirs on
Real world example 1
Share home directories through NFS
setsebool -P use_nfs_home_dirs on
Share home directories through SaMBa
setsebool -P use_samba_home_dirs on
setsebool -P samba_enable_home_dirs on
Real world example 1
Share home directories through NFS
setsebool -P use_nfs_home_dirs on
Share home directories through SaMBa
setsebool -P use_samba_home_dirs on
Mount SaMBa home dirs on client
setsebool -P samba_enable_home_dirs on
Share home dirs on SaMBa server
Real world example 1
Share home directories through NFS
setsebool -P use_nfs_home_dirs on
Share home directories through SaMBa
setsebool -P use_samba_home_dirs on
setsebool -P samba_enable_home_dirs on
Share ~/public_html through Apache
setsebool -P apache_enable_homedirs on
SELinux for Sysadmins
Principles for using SELinux
Use booleans where possible
Real world example 2
Sharing /data through SaMBa
Real world example 2
Sharing /data through SaMBa
getsebool -a | grep samba samba_create_home_dirs --> off samba_domain_controller --> off samba_enable_home_dirs --> off samba_export_all_ro --> off samba_export_all_rw --> off samba_run_unconfined --> on samba_share_fusefs --> off samba_share_nfs --> off use_samba_home_dirs --> off virt_use_samba --> off
man {ftpd,named,rsync,httpd,nfs,samba, kerberos,nis,ypbind}_selinux is your friend!
Real world example 3
Sharing /data with SaMBa and VSFTPD
Real world example 3
Sharing /data with SaMBa and VSFTPD
Gotcha!
Real world example 3
Sharing /data with SaMBa and VSFTPD
Files can only have one security context!
Real world example 3
Sharing /data with SaMBa and VSFTPD
Files can only have one security context!
getsebool -a | grep ftp allow_ftpd_anon_write --> off allow_ftpd_full_access --> off allow_ftpd_use_cifs --> off allow_ftpd_use_nfs --> off ftp_home_dir --> off ftpd_connect_db --> off httpd_enable_ftp_server --> off tftp_anon_write --> off
Real world example 3
Sharing /data with SaMBa and VSFTPD
Files can only have one security context!
allow_ftpd_use_cifs is written to allow (vs)ftpd to share a directory that is mounted from a CIFS server!
Real world example 3
Sharing /data with SaMBa and VSFTPD
Files can only have one security context!
allow_ftpd_use_cifs is written to allow (vs)ftpd to share a directory that is mounted from a CIFS server!
In his previous talk, Paul talked about getting you more
In his previous talk, Paul talked about getting your system to work with SELinux. This involved setting the security on your files and directories so that they worked with SELinux. However, many people have customised their Linux installs and want SELinux to do what they say, not the other way around. Sysadmins in particular are not 'run of the mill' users, and they have different requirements to what typically comes out of the box. Situations such as serving web pages from NFS shares or non-standard directories, or installing applications in custom locations, need specialised configuration of SELinux in order to make it work with your needs.
This talk will deal with those situations. Fortunately for Sysadmins, much of the work in developing SELinux policies for Linux has focussed on their requirements. Paul will show you a few of the things behind the scenes that make your job as a Sysadmin much easier and safer with SELinux. less
0 comments
Post a comment