
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://selinuxproject.org/w/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://selinuxproject.org/w/?title=SambaRecipes&amp;action=history&amp;feed=atom</id>
		<title>SambaRecipes - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://selinuxproject.org/w/?title=SambaRecipes&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=SambaRecipes&amp;action=history"/>
		<updated>2013-05-25T03:28:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.4</generator>

	<entry>
		<id>http://selinuxproject.org/w/?title=SambaRecipes&amp;diff=1004&amp;oldid=prev</id>
		<title>Jaxelson: added category</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=SambaRecipes&amp;diff=1004&amp;oldid=prev"/>
				<updated>2010-08-31T18:29:12Z</updated>
		
		<summary type="html">&lt;p&gt;added category&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 18:29, 31 August 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 46:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 46:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;       system-config-selinux is a GUI tool available to customize SELinux policy settings.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;       system-config-selinux is a GUI tool available to customize SELinux policy settings.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;[[Category:Recipes]]&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jaxelson</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=SambaRecipes&amp;diff=820&amp;oldid=prev</id>
		<title>JoshuaBrindle: initial checkin of samba recipes</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=SambaRecipes&amp;diff=820&amp;oldid=prev"/>
				<updated>2009-11-20T20:02:34Z</updated>
		
		<summary type="html">&lt;p&gt;initial checkin of samba recipes&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Samba is the SMB/CIFS daemon for sharing drives with Windows systems. It can be configured in a number of ways including sharing home directories, read only exports and so on. With SELinux you can enforce your Samba configuration so that even an exploit in Samba can't change the settings. A number of Samba recipes follow for common tasks.&lt;br /&gt;
&lt;br /&gt;
= Sharing non-home directory files =&lt;br /&gt;
SELinux  requires  files to have an extended attribute to define the file type.  Policy governs the access daemons have to these files.  If you&lt;br /&gt;
want to share files other than home directories, those files must be labeled ''samba_share_t''.  So if you created a  special directory ''/var/eng'',&lt;br /&gt;
you would need to label the directory with the chcon tool.&lt;br /&gt;
&lt;br /&gt;
 chcon -t samba_share_t /var/eng&lt;br /&gt;
&lt;br /&gt;
To make this change permanent (survive a relabel), use the semanage command to add the change to file context configuration:&lt;br /&gt;
&lt;br /&gt;
 # semanage fcontext -a -t samba_share_t &amp;quot;/var/eng(/.*)?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Run the restorecon command to apply the changes:&lt;br /&gt;
&lt;br /&gt;
 # restorecon -R -v /var/eng/&lt;br /&gt;
&lt;br /&gt;
'''Note:  You  should  not  do  the above for standard directories or home directories!  For example directories owned by an RPM.  If you wanted to share /usr via Samba, changing its context and all of the sub directories  to ''samba_share_t'' would be a bad idea.  Other confined domains would no longer be able to read /usr and this would cause havoc on the machine.  There are two booleans that you can set  to  allow the sharing of standard directories.  If you want to share any standard directory read/only you can set the boolean ''samba_export_all_ro''.'''&lt;br /&gt;
&lt;br /&gt;
 # setsebool -P samba_export_all_ro=1&lt;br /&gt;
&lt;br /&gt;
This boolean will allow Samba to read every file on the system. Similarly if you want to share all files and directories via Samba, you set the ''samba_export_all_rw''&lt;br /&gt;
&lt;br /&gt;
 # setsebool -P samba_export_all_rw=1&lt;br /&gt;
&lt;br /&gt;
This boolean would allow Samba to read and write every file on your system.  So a compromised Samba server would be very dangerous.&lt;br /&gt;
&lt;br /&gt;
= Sharing files with Apache, FTP, and Samba =&lt;br /&gt;
If  you  want  to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of ''public_content_t'' and ''public_content_rw_t''.  These context allow any of the above domains to read the content.  If you want a particular domain to write to the ''public_content_rw_t'' domain, you must set the appropriate boolean.  ''allow_'''DOMAIN'''_anon_write''.  So for samba you would execute:&lt;br /&gt;
&lt;br /&gt;
 # setsebool -P allow_smbd_anon_write=1&lt;br /&gt;
&lt;br /&gt;
= Sharing home directories with Samba =&lt;br /&gt;
&lt;br /&gt;
SELinux  policy is customizable based on least access required.  So by default SElinux policy turns off SELinux sharing of home directories and the use of Samba shares from a remote machine as a home directory.&lt;br /&gt;
&lt;br /&gt;
If you are setting up this machine as a Samba server and wish to share the home directories, you need to set the ''samba_enable_home_dirs'' boolean.&lt;br /&gt;
&lt;br /&gt;
 # setsebool -P samba_enable_home_dirs=1&lt;br /&gt;
&lt;br /&gt;
= Home directories are on a Samba server =&lt;br /&gt;
&lt;br /&gt;
If you want to use a remote Samba server for the home directories on this machine, you must set the ''use_samba_home_dirs'' boolean.&lt;br /&gt;
&lt;br /&gt;
 setsebool -P use_samba_home_dirs 1&lt;br /&gt;
&lt;br /&gt;
       system-config-selinux is a GUI tool available to customize SELinux policy settings.&lt;/div&gt;</summary>
		<author><name>JoshuaBrindle</name></author>	</entry>

	</feed>