<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>MN Linux</title>
	<atom:link href="http://mnlinux.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mnlinux.wordpress.com</link>
	<description>It's about community.</description>
	<lastBuildDate>Wed, 10 Feb 2010 03:32:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mnlinux.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>MN Linux</title>
		<link>http://mnlinux.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mnlinux.wordpress.com/osd.xml" title="MN Linux" />
	<atom:link rel='hub' href='http://mnlinux.wordpress.com/?pushpress=hub'/>
		<item>
		<title>HTML Tags</title>
		<link>http://mnlinux.wordpress.com/2010/02/10/html-tags/</link>
		<comments>http://mnlinux.wordpress.com/2010/02/10/html-tags/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 03:32:02 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2643</guid>
		<description><![CDATA[&#60;html&#62; &#8211; Begins your HTML document. &#60;head&#62; &#8211; Contains information about the page such as the TITLE, META tags for proper Search Engine indexing, STYLE tags, which determine the page layout, and JavaScript coding for special effects. &#60;title&#62; - The TITLE of your page. This will be visible in the title bar of the viewers’ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2643&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>&lt;html&gt;</strong> &#8211; Begins your HTML<strong> </strong>document.</p>
<p><strong>&lt;head&gt;</strong> &#8211; Contains information about the page such as the TITLE, META tags for proper Search Engine indexing, STYLE tags, which determine the page layout, and JavaScript coding for special effects.</p>
<p><strong>&lt;title&gt; </strong>- The TITLE of your page. This will be visible in the title bar of the viewers’ browser.</p>
<p><strong>&lt;/title&gt; </strong>- Closes the HTML &lt;title&gt; tag.</p>
<p><strong>&lt;/head&gt; </strong>- Closes the HTML &lt;head&gt; tag.</p>
<p><strong>&lt;body&gt;</strong> &#8211; This is where you will begin writing your document and placing your HTML codes.</p>
<p><strong>&lt;/body&gt;</strong> &#8211; Closes the HTML &lt;body&gt; tag.</p>
<p><strong>&lt;/html&gt;</strong> &#8211; Closes the &lt;html&gt; tag.</p>
<p><strong>HTML Tags Chart</strong></p>
<p>To use any of the following HTML tags, simply select the HTML code you&#8217;d like and copy and paste it into your web page.</p>
<table border="2" cellspacing="1" cellpadding="2" width="95%" align="Center">
<tbody>
<tr>
<td bgcolor="#3f7fbb"><strong>Tag</strong></td>
<td bgcolor="#3f7fbb"><strong>Name</strong></td>
<td bgcolor="#3f7fbb"><strong>Code Example</strong></td>
<td bgcolor="#3f7fbb"><strong>Browser View</strong></td>
</tr>
<tr>
<td>&lt;!&#8211;</td>
<td><strong>comment</strong></td>
<td><strong>&lt;!&#8211;</strong>This can be viewed in the <strong>HTML</strong> part of a document<strong>&#8211;&gt;</strong></td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;a -</td>
<td><strong>anchor</strong></td>
<td><strong>&lt;a href=</strong>&#8220;http://www.domain.com/&#8221;&gt;<br />
Visit Our Site<strong>&lt;/a&gt;</strong></td>
<td><span style="text-decoration:underline;">Visit Our Site</span> <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;b&gt;</td>
<td><strong>bold</strong></td>
<td><strong>&lt;b&gt;</strong>Example<strong>&lt;/b&gt;</strong></td>
<td><strong>Example</strong></td>
</tr>
<tr>
<td>&lt;big&gt;</td>
<td><strong>big (text)</strong></td>
<td><strong>&lt;big&gt;</strong>Example<strong>&lt;/big&gt;</strong></td>
<td><big>Example </big><a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;body&gt;</td>
<td><strong>body of HTML document</strong></td>
<td><strong>&lt;body&gt;</strong>The content of your <strong>HTML</strong> page<strong>&lt;/body&gt;</strong></td>
<td>Contents of your web page <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;br&gt;</td>
<td><strong>line break</strong></td>
<td>The contents of your page<strong>&lt;br&gt;</strong>The contents of your page</td>
<td>The contents of your web page<br />
The contents of your web page</td>
</tr>
<tr>
<td>&lt;center&gt;</td>
<td><strong>center</strong></td>
<td><strong>&lt;center&gt;</strong>This will center your contents<strong>&lt;/center&gt;</strong></td>
<td>This will center your contents</td>
</tr>
<tr>
<td>&lt;dd&gt;</td>
<td><strong>definition description</strong></td>
<td>&lt;dl&gt;<br />
&lt;dt&gt;Definition Term&lt;/dt&gt;<br />
<strong>&lt;dd&gt;Definition of the term&lt;/dd&gt;</strong><br />
&lt;dt&gt;Definition Term&lt;/dt&gt;<br />
<strong>&lt;dd&gt;Definition of the term&lt;/dd&gt;</strong><br />
&lt;/dl&gt;</td>
<td>
<dl>
<dt>Definition Term</dt>
<dd><strong>Definition of the term</strong></dd>
<dt>Definition Term</dt>
<dd><strong>Definition of the term</strong></dd>
</dl>
</td>
</tr>
<tr>
<td>&lt;dl&gt;</td>
<td><strong>definition list</strong></td>
<td><strong>&lt;dl&gt;</strong><br />
&lt;dt&gt;Definition Term&lt;/dt&gt;<br />
&lt;dd&gt;Definition of the term&lt;/dd&gt;<br />
&lt;dt&gt;Definition Term&lt;/dt&gt;<br />
&lt;dd&gt;Definition of the term&lt;/dd&gt;<br />
<strong>&lt;/dl&gt;</strong></td>
<td>
<dl>
<dt>Definition Term</dt>
<dd>Definition of the term</dd>
<dt>Definition Term</dt>
<dd>Definition of the term</dd>
</dl>
</td>
</tr>
<tr>
<td>&lt;dt&gt;</td>
<td><strong>definition term</strong></td>
<td>&lt;dl&gt;<br />
<strong>&lt;dt&gt;Definition Term&lt;/dt&gt;</strong><br />
&lt;dd&gt;Definition of the term&lt;/dd&gt;<br />
<strong>&lt;dt&gt;Definition Term&lt;/dt&gt;</strong><br />
&lt;dd&gt;Definition of the term&lt;/dd&gt;<br />
&lt;/dl&gt;</td>
<td>
<dl>
<dt><strong>Definition Term</strong></dt>
<dd>Definition of the term</dd>
<dt><strong>Definition Term</strong></dt>
<dd>Definition of the term</dd>
</dl>
</td>
</tr>
<tr>
<td>&lt;em&gt;</td>
<td><strong>emphasis</strong></td>
<td>This is an <strong>&lt;em&gt;</strong>Example<strong>&lt;/em&gt;</strong> of using the emphasis tag</td>
<td>This is an <em>Example</em> of using the emphasis tag</td>
</tr>
<tr>
<td>&lt;embed&gt;</td>
<td><strong>embed object</strong></td>
<td><strong>&lt;embed</strong> src=&#8221;yourfile.mid&#8221; width=&#8221;100%&#8221; height=&#8221;60&#8243; align=&#8221;center&#8221;&gt;</td>
<td>
<a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;embed&gt;</td>
<td><strong>embed object</strong></td>
<td>&lt;<strong>embed</strong> src=&#8221;yourfile.mid&#8221; autostart=&#8221;true&#8221; hidden=&#8221;false&#8221; loop=&#8221;false&#8221;&gt;<br />
&lt;noembed&gt;&lt;bgsound src=&#8221;yourfile.mid&#8221; loop=&#8221;1&#8243;&gt;&lt;/noembed&gt;</td>
<td>
<p>Music will begin playing when your page is loaded and will only play one time. A control panel will be displayed to enable your visitors to stop the music.</td>
</tr>
<tr>
<td>&lt;font&gt;</td>
<td><strong>font</strong></td>
<td><strong>&lt;font</strong> face=&#8221;Times New Roman&#8221;&gt;Example<strong>&lt;/font&gt;</strong></td>
<td>Example <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;font&gt;</td>
<td><strong>font</strong></td>
<td><strong>&lt;font</strong> face=&#8221;Times New Roman&#8221; size=&#8221;4&#8243;&gt;Example<strong>&lt;/font&gt;</strong></td>
<td>Example <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;font&gt;</td>
<td><strong>font</strong></td>
<td><strong>&lt;font</strong> face=&#8221;Times New Roman&#8221; size=&#8221;+3&#8243; color=&#8221;#ff0000&#8243;&gt;Example<strong>&lt;/font&gt;</strong></td>
<td>Example <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;form&gt;</td>
<td><strong>form</strong></td>
<td><strong>&lt;form </strong>action=&#8221;mailto:you@yourdomain.com&#8221;&gt;<br />
Name: &lt;input value=&#8221;" size=&#8221;10&#8243;&gt;&lt;br&gt;<br />
Email: &lt;input value=&#8221;" size=&#8221;10&#8243;&gt;&lt;br&gt;<br />
&lt;center&gt;&lt;input&gt;&lt;/center&gt;<br />
<strong>&lt;/form&gt;</strong></td>
<td>Name:  <a>(Tip)</a><br />
Email: 
</td>
</tr>
<tr>
<td>&lt;h1&gt;<br />
&lt;h2&gt;<br />
&lt;h3&gt;<br />
&lt;h4&gt;<br />
&lt;h5&gt;<br />
&lt;h6&gt;</td>
<td><strong>heading 1</strong><br />
<strong>heading 2</strong><br />
<strong>heading 3</strong><br />
<strong>heading 4</strong><br />
<strong>heading 5</strong><br />
<strong>heading 6</strong></td>
<td><strong>&lt;h1&gt;</strong>Heading 1 Example<strong>&lt;/h1&gt;</strong><br />
<strong>&lt;h2&gt;</strong>Heading 2 Example<strong>&lt;/h2&gt;</strong><br />
<strong>&lt;h3&gt;</strong>Heading 3 Example<strong>&lt;/h3&gt;</strong><br />
<strong>&lt;h4&gt;</strong>Heading 4 Example<strong>&lt;/h4&gt;</strong><br />
<strong>&lt;h5&gt;</strong>Heading 5 Example<strong>&lt;/h5&gt;</strong><br />
<strong>&lt;h6&gt;</strong>Heading 6 Example<strong>&lt;/h6&gt;</strong></td>
<td></td>
</tr>
<tr>
<td>&lt;head&gt;</td>
<td><strong>heading of HTML document</strong></td>
<td><strong>&lt;head&gt;</strong>Contains elements describing the document<strong>&lt;/head&gt;</strong></td>
<td>Nothing will show</td>
</tr>
<tr>
<td>&lt;hr&gt;</td>
<td><strong>horizontal rule</strong></td>
<td><strong>&lt;hr /&gt;</strong></td>
<td>
Contents of your web page <a>(Tip)</a></p>
<hr />Contents of your web page</td>
</tr>
<tr>
<td>&lt;hr&gt;</td>
<td><strong>horizontal rule</strong></td>
<td><strong>&lt;hr </strong>width=&#8221;50%&#8221; size=&#8221;3&#8243; /&gt;</td>
<td>Contents of your web page</p>
<hr size="3" />Contents of your web page</td>
</tr>
<tr>
<td>&lt;hr&gt;</td>
<td><strong>horizontal rule</strong></td>
<td><strong>&lt;hr </strong>width=&#8221;50%&#8221; size=&#8221;3&#8243; noshade /&gt;</td>
<td>Contents of your web page</p>
<hr size="3" />Contents of your web page</td>
</tr>
<tr>
<td>&lt;hr&gt;<br />
(Internet<br />
Explorer)</td>
<td><strong>horizontal rule</strong></td>
<td><strong>&lt;hr </strong>width=&#8221;75%&#8221; color=&#8221;<a href="216_color_chart.htm.htm">#ff0000</a>&#8221; size=&#8221;4&#8243; /&gt;</td>
<td>Contents of your web page</p>
<hr size="4" />Contents of your web page</td>
</tr>
<tr>
<td>&lt;hr&gt;<br />
(Internet<br />
Explorer)</td>
<td><strong>horizontal rule</strong></td>
<td><strong>&lt;hr </strong>width=&#8221;25%&#8221; color=&#8221;<a href="216_color_chart.htm">#6699ff</a>&#8221; size=&#8221;6&#8243; /&gt;</td>
<td>Contents of your web page</p>
<hr size="6" />Contents of your web page</td>
</tr>
<tr>
<td>&lt;html&gt;</td>
<td><strong>hypertext markup language</strong></td>
<td><strong>&lt;html&gt;<br />
</strong>&lt;head&gt;<br />
&lt;meta&gt;<br />
&lt;title&gt;Title of your web page&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<strong>HTML web page </strong>contents<br />
&lt;/body&gt;<br />
<strong>&lt;/html&gt;</strong></td>
<td>Contents of your web page</td>
</tr>
<tr>
<td>&lt;i&gt;</td>
<td><strong>italic</strong></td>
<td><strong>&lt;i&gt;</strong>Example<strong>&lt;/i&gt;</strong></td>
<td><em>Example</em></td>
</tr>
<tr>
<td>&lt;img&gt;</td>
<td><strong>image</strong></td>
<td><strong>&lt;img </strong>src=&#8221;Earth.gif&#8221; width=&#8221;41&#8243; height=&#8221;41&#8243; border=&#8221;0&#8243; alt=&#8221;text describing the image&#8221; /&gt;</td>
<td><a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;input&gt;</td>
<td><strong>input field</strong></td>
<td>Example 1:</p>
<p>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
<strong>&lt;input </strong>type=&#8221;text&#8221; size=&#8221;10&#8243; maxlength=&#8221;30&#8243;&gt;<br />
<strong>&lt;input </strong>type=&#8221;Submit&#8221; value=&#8221;Submit&#8221;&gt;<br />
&lt;/form&gt;</td>
<td>Example 1: <a>(Tip)</a></p>
</td>
</tr>
<tr>
<td>&lt;input&gt;<br />
(Internet Explorer)</td>
<td><strong>input field</strong></td>
<td>Example 2:</p>
<p>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
<strong>&lt;input </strong>type=&#8221;text&#8221; style=&#8221;color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;&#8221; size=&#8221;10&#8243; maxlength=&#8221;30&#8243;&gt;<br />
<strong>&lt;input </strong>type=&#8221;Submit&#8221; value=&#8221;Submit&#8221;&gt;<br />
&lt;/form&gt;</td>
<td>Example 2: <a>(Tip)</a></p>
</td>
</tr>
<tr>
<td>&lt;input&gt;</td>
<td><strong>input field</strong></td>
<td>Example 3:</p>
<p>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
&lt;table border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;2&#8243;&gt;&lt;tr&gt;&lt;td bgcolor=&#8221;#8463ff&#8221;&gt;&lt;input size=&#8221;10&#8243; maxlength=&#8221;30&#8243;&gt;&lt;/td&gt;&lt;td bgcolor=&#8221;#8463ff&#8221; valign=&#8221;Middle&#8221;&gt; &lt;input src=&#8221;yourimage.gif&#8221;&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;<br />
&lt;/form&gt;</td>
<td>Example 3: <a>(Tip)</a></p>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td bgcolor="#8463FF"></td>
<td valign="Middle" bgcolor="#8463FF"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>&lt;input&gt;</td>
<td><strong>input field</strong></td>
<td>Example 4:</p>
<p>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
Enter Your Comments:&lt;br&gt;<br />
&lt;textarea wrap=&#8221;virtual&#8221; rows=3 cols=20 maxlength=100&gt;&lt;/textarea&gt;&lt;br&gt;<br />
<strong>&lt;input </strong>type=&#8221;Submit&#8221; value=&#8221;Submit&#8221;&gt;<br />
<strong>&lt;input </strong>type=&#8221;Reset&#8221; value=&#8221;Clear&#8221;&gt;<br />
&lt;/form&gt;</td>
<td>Example 4: <a>(Tip)</a></p>
</td>
</tr>
<tr>
<td>&lt;input&gt;</td>
<td><strong>input field</strong></td>
<td>Example 5:</p>
<p>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
&lt;center&gt;<br />
Select an option:<br />
&lt;select&gt;<br />
&lt;option &gt;option 1&lt;/option&gt;<br />
&lt;option selected&gt;option 2&lt;/option&gt;<br />
&lt;option&gt;option 3&lt;/option&gt;<br />
&lt;option&gt;option 4&lt;/option&gt;<br />
&lt;option&gt;option 5&lt;/option&gt;<br />
&lt;option&gt;option 6&lt;/option&gt;<br />
&lt;/select&gt;&lt;br&gt;<br />
<strong>&lt;input </strong>type=&#8221;Submit&#8221; value=&#8221;Submit&#8221;&gt;&lt;/center&gt;<br />
&lt;/form&gt;</td>
<td>Example 5: <a>Tip)</a></p>
<p>Select an option:  option 1 option 2 option 3 option 4 option 5 option 6 </p>
</td>
</tr>
<tr>
<td>&lt;input&gt;</td>
<td><strong>input field</strong></td>
<td>Example 6:</p>
<p>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
Select an option:&lt;br&gt;<br />
<strong>&lt;input </strong>type=&#8221;radio&#8221;&gt; Option 1<br />
<strong>&lt;input </strong>type=&#8221;radio&#8221; checked&gt; Option 2<br />
<strong>&lt;input </strong>type=&#8221;radio&#8221;&gt; Option 3<br />
&lt;br&gt;<br />
&lt;br&gt;<br />
Select an option:&lt;br&gt;<br />
<strong>&lt;input </strong>type=&#8221;checkbox&#8221;&gt; Selection 1<br />
<strong>&lt;input </strong>type=&#8221;checkbox&#8221; checked&gt;<strong> </strong>Selection 2<br />
<strong>&lt;input </strong>type=&#8221;checkbox&#8221;&gt;<strong> </strong>Selection 3<br />
<strong>&lt;input </strong>type=&#8221;Submit&#8221; value=&#8221;Submit&#8221;&gt;<br />
&lt;/form&gt;</td>
<td>Example 6: <a>(Tip)</a></p>
<p>Select an option:<br />
 Option 1<br />
 Option 2<br />
 Option 3</p>
<p>Select an option:<br />
 Selection 1<br />
 Selection 2<br />
 Selection 3
</td>
</tr>
<tr>
<td>&lt;li&gt;</td>
<td><strong>list item</strong></td>
<td>Example 1:</p>
<p>&lt;menu&gt;<br />
<strong>&lt;li </strong>type=&#8221;disc&#8221;&gt;List item 1<strong>&lt;/li&gt;</strong><br />
<strong>&lt;li </strong>type=&#8221;circle&#8221;&gt;List item 2<strong>&lt;/li&gt;</strong><br />
<strong>&lt;li </strong>type=&#8221;square&#8221;&gt;List item 3<strong>&lt;/li&gt;</strong><br />
&lt;/MENU&gt;</p>
<p>Example 2:</p>
<p>&lt;ol&gt;<br />
<strong>&lt;li&gt;</strong>List item 1<strong>&lt;/li&gt;</strong><br />
<strong>&lt;li&gt;</strong>List item 2<strong>&lt;/li&gt;</strong><br />
<strong>&lt;li&gt;</strong>List item 3<strong>&lt;/li&gt;</strong><br />
<strong>&lt;li&gt;</strong>List item 4<strong>&lt;/li&gt;</strong><br />
&lt;/ol&gt;</td>
<td>Example 1: <a>(Tip)</a></p>
<ul>
<li><strong>List item 1</strong></li>
<li><strong>List item 2</strong></li>
<li><strong>List item 3</strong></li>
</ul>
<p>Example 2:</p>
<ol>
<li><strong>List item 1</strong></li>
<li><strong>List item 2</strong></li>
<li><strong>List item 3</strong></li>
<li><strong>List item 4</strong></li>
</ol>
</td>
</tr>
<tr>
<td>&lt;link&gt;</td>
<td><strong>link</strong></td>
<td>&lt;head&gt;<br />
&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;style.css&#8221; /&gt;<br />
&lt;/head&gt;</td>
<td></td>
</tr>
<tr>
<td>&lt;marquee&gt;<br />
(Internet<br />
Explorer)</td>
<td><strong>scrolling text</strong></td>
<td><strong>&lt;marquee </strong>bgcolor=&#8221;<a href="216_color_chart.htm">#cccccc</a>&#8221; loop=&#8221;-1&#8243; scrollamount=&#8221;2&#8243; width=&#8221;100%&#8221;&gt;Example Marquee<strong>&lt;/marquee&gt;</strong></td>
<td>Example Marquee<a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;menu&gt;</td>
<td><strong>menu</strong></td>
<td><strong>&lt;menu&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
<strong>&lt;/menu&gt;</strong></td>
<td>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
</td>
</tr>
<tr>
<td>&lt;meta&gt;</td>
<td><strong>meta</strong></td>
<td><strong>&lt;meta </strong>name=&#8221;Description&#8221; content=&#8221;Description of your site&#8221;&gt;<br />
<strong>&lt;meta </strong>name=&#8221;keywords&#8221; content=&#8221;keywords describing your site&#8221;&gt;</td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;meta&gt;</td>
<td><strong>meta</strong></td>
<td><strong>&lt;meta </strong>HTTP-EQUIV=&#8221;Refresh&#8221; CONTENT=&#8221;4;URL=http://www.yourdomain.com/&#8221;&gt;</td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;meta&gt;</td>
<td><strong>meta</strong></td>
<td><strong>&lt;meta </strong>http-equiv=&#8221;Pragma&#8221; content=&#8221;no-cache&#8221;&gt;</td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;meta&gt;</td>
<td><strong>meta</strong></td>
<td><strong>&lt;meta </strong>name=&#8221;rating&#8221; content=&#8221;General&#8221;&gt;</td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;meta&gt;</td>
<td><strong>meta</strong></td>
<td><strong>&lt;meta </strong>name=&#8221;robots&#8221; content=&#8221;all&#8221;&gt;</td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;meta&gt;</td>
<td><strong>meta</strong></td>
<td><strong>&lt;meta </strong>name=&#8221;robots&#8221; content=&#8221;noindex,follow&#8221;&gt;</td>
<td>Nothing will show <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;ol&gt;</td>
<td><strong>ordered list</strong></td>
<td><strong>Numbered</strong></p>
<p><strong>&lt;ol&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</strong></p>
<p><strong>Numbered Special Start</strong></p>
<p><strong>&lt;ol start=&#8221;5&#8243;&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</strong></p>
<p><strong>Lowercase Letters</strong><strong>&lt;ol&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</p>
<p>Capital Letters</strong></p>
<p><strong>&lt;ol&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</p>
<p>Capital Letters Special Start</strong></p>
<p><strong>&lt;ol start=&#8221;3&#8243;&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</p>
<p>Lowercase Roman Numerals</strong></p>
<p><strong>&lt;ol&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</p>
<p>Capital Roman Numerals</strong></p>
<p><strong>&lt;ol&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</strong></p>
<p><strong>Capital Roman Numerals Special Start</strong></p>
<p><strong>&lt;ol start=&#8221;7&#8243;&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ol&gt;</strong></td>
<td valign="Top"><strong>Numbered</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Numbered Special Start</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Lowercase Letters</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Capital Letters</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Capital Letters Special Start</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Lowercase Roman Numerals</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Capital Roman Numerals</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<p><strong>Capital Roman Numerals Special Start</strong></p>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
</td>
</tr>
<tr>
<td>&lt;option&gt;</td>
<td><strong>listbox option</strong></td>
<td>&lt;form method=post action=&#8221;/cgi-bin/example.cgi&#8221;&gt;<br />
&lt;center&gt;<br />
Select an option:<br />
&lt;select&gt;<br />
<strong>&lt;option&gt;</strong>option 1<strong>&lt;/option&gt;</strong><br />
<strong>&lt;option selected&gt;</strong>option 2<strong>&lt;/option&gt;</strong><br />
<strong>&lt;option&gt;</strong>option 3<strong>&lt;/option&gt;</strong><br />
<strong>&lt;option&gt;</strong>option 4<strong>&lt;/option&gt;</strong><br />
<strong>&lt;option&gt;</strong>option 5<strong>&lt;/option&gt;</strong><br />
<strong>&lt;option&gt;</strong>option 6<strong>&lt;/option&gt;</strong><br />
&lt;/select&gt;&lt;br&gt;<br />
&lt;/center&gt;<br />
&lt;/form&gt;</td>
<td>Select an option: <a>(Tip)</a><br />
 option 1 option 2 option 3 option 4 option 5 option 6
</td>
</tr>
<tr>
<td>&lt;p&gt;</td>
<td><strong>paragraph</strong></td>
<td>This is an example displaying the use of the paragraph tag. &lt;p&gt; This will create a line break and a space between lines.</p>
<p>Attributes:</p>
<p>Example 1:&lt;br&gt;<br />
&lt;br&gt;<br />
<strong>&lt;p align=&#8221;left&#8221;&gt;</strong><br />
This is an example&lt;br&gt;<br />
displaying the use&lt;br&gt;<br />
of the paragraph tag.&lt;br&gt;<br />
&lt;br&gt;<br />
Example 2:&lt;br&gt;<br />
&lt;br&gt;<br />
<strong>&lt;p align=&#8221;right&#8221;&gt;</strong><br />
This is an example&lt;br&gt;<br />
displaying the use&lt;br&gt;<br />
of the paragraph tag.&lt;br&gt;<br />
&lt;br&gt;<br />
Example 3:&lt;br&gt;<br />
&lt;br&gt;<br />
<strong>&lt;p align=&#8221;center&#8221;&gt;</strong><br />
This is an example&lt;br&gt;<br />
displaying the use&lt;br&gt;<br />
of the paragraph tag.</td>
<td>This is an example displaying the use of the paragraph tag.</p>
<p>This will create a line break and a space between lines.</p>
<p>Attributes:</p>
<p>Example 1:</p>
<p>This is an example<br />
displaying the use<br />
of the paragraph tag.</p>
<p>Example 2:</p>
<p>This is an example<br />
displaying the use<br />
of the paragraph tag.</p>
<p>Example 3:</p>
<p>This is an example<br />
displaying the use<br />
of the paragraph tag.</td>
</tr>
<tr>
<td>&lt;small&gt;</td>
<td><strong>small (text)</strong></td>
<td><strong>&lt;small&gt;</strong>Example<strong>&lt;/small&gt;</strong></td>
<td>Example <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;strike&gt;</td>
<td><strong>deleted text</strong></td>
<td><strong>&lt;strike&gt;</strong>Example<strong>&lt;/strike&gt;</strong></td>
<td><span style="text-decoration:line-through;">Example</span></td>
</tr>
<tr>
<td>&lt;strong&gt;</td>
<td><strong>strong emphasis</strong></td>
<td><strong>&lt;strong&gt;</strong>Example<strong>&lt;/strong&gt;</strong></td>
<td><strong>Example</strong></td>
</tr>
<tr>
<td>&lt;table&gt;</td>
<td><strong>table</strong></td>
<td>Example 1:</p>
<p><strong>&lt;table border=</strong>&#8220;4&#8243; cellpadding=&#8221;2&#8243; cellspacing=&#8221;2&#8243; width=&#8221;100%&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Column 1&lt;/td&gt;<br />
&lt;td&gt;Column 2&lt;/td&gt;<br />
&lt;/tr&gt;<br />
<strong>&lt;/table&gt;</strong></p>
<p>Example 2: (Internet Explorer)</p>
<p><strong>&lt;table border=</strong>&#8220;2&#8243; bordercolor=&#8221;<a href="216_color_chart.htm">#336699</a>&#8221; cellpadding=&#8221;2&#8243; cellspacing=&#8221;2&#8243; width=&#8221;100%&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Column 1&lt;/td&gt;<br />
&lt;td&gt;Column 2&lt;/td&gt;<br />
&lt;/tr&gt;<br />
<strong>&lt;/table&gt;</strong></p>
<p>Example 3:</p>
<p><strong>&lt;table cellpadding=</strong>&#8220;2&#8243; cellspacing=&#8221;2&#8243; width=&#8221;100%&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td bgcolor=&#8221;<a href="216_color_chart.htm">#cccccc</a>&#8220;&gt;Column 1&lt;/td&gt;<br />
&lt;td bgcolor=&#8221;<a href="216_color_chart.htm">#cccccc</a>&#8220;&gt;Column 2&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Row 2&lt;/td&gt;<br />
&lt;td&gt;Row 2&lt;/td&gt;<br />
&lt;/tr&gt;<br />
<strong>&lt;/table&gt;</strong></td>
<td>Example 1: <a>(Tip)</a></p>
<table border="4" cellpadding="2" width="100%">
<tbody>
<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
</tbody>
</table>
<p>Example 2: <a>(Tip)</a></p>
<table border="2" cellspacing="2" cellpadding="2" width="100%">
<tbody>
<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
</tbody>
</table>
<p>Example 3: <a>(Tip)</a></p>
<table cellspacing="2" cellpadding="2" width="100%">
<tbody>
<tr>
<td bgcolor="#CCCCCC">Column 1</td>
<td bgcolor="#CCCCCC">Column 2</td>
</tr>
<tr>
<td>Row 2</td>
<td>Row 2</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>&lt;td&gt;</td>
<td><strong>table data</strong></td>
<td>&lt;table border=&#8221;2&#8243; cellpadding=&#8221;2&#8243; cellspacing=&#8221;2&#8243; width=&#8221;100%&#8221;&gt;<br />
&lt;tr&gt;<br />
<strong>&lt;td&gt;Column 1&lt;/td&gt;<br />
&lt;td&gt;Column 2&lt;/td&gt;</strong><br />
&lt;/tr&gt;<br />
&lt;/table&gt;</td>
<td>
<table border="2" cellspacing="2" cellpadding="2" width="100%">
<tbody>
<tr>
<td><strong>Column 1</strong></td>
<td><strong>Column 2</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>&lt;th&gt;</td>
<td><strong>table header</strong></td>
<td>&lt;div align=&#8221;center&#8221;&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
<strong>&lt;th&gt;Column 1&lt;/th&gt;<br />
&lt;th&gt;Column 2&lt;/th&gt;<br />
&lt;th&gt;Column 3&lt;/th&gt;</strong><br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Row 2&lt;/td&gt;<br />
&lt;td&gt;Row 2&lt;/td&gt;<br />
&lt;td&gt;Row 2&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Row 3&lt;/td&gt;<br />
&lt;td&gt;Row 3&lt;/td&gt;<br />
&lt;td&gt;Row 3&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Row 4&lt;/td&gt;<br />
&lt;td&gt;Row 4&lt;/td&gt;<br />
&lt;td&gt;Row 4&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/div&gt;</td>
<td>
<table>
<tbody>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td>Row 2</td>
<td>Row 2</td>
<td>Row 2</td>
</tr>
<tr>
<td>Row 3</td>
<td>Row 3</td>
<td>Row 3</td>
</tr>
<tr>
<td>Row 4</td>
<td>Row 4</td>
<td>Row 4</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>&lt;title&gt;</td>
<td><strong>document title</strong></td>
<td><strong>&lt;title&gt;</strong>Title of your <strong>HTML page&lt;/title&gt;</strong></td>
<td>Title of your web page will be viewable in the title bar. <a>(Tip)</a></td>
</tr>
<tr>
<td>&lt;tr&gt;</td>
<td><strong>table row</strong></td>
<td>&lt;table border=&#8221;2&#8243; cellpadding=&#8221;2&#8243; cellspacing=&#8221;2&#8243; width=&#8221;100%&#8221;&gt;<br />
<strong>&lt;tr&gt;</strong><br />
&lt;td&gt;Column 1&lt;/td&gt;<strong><br />
</strong>&lt;td&gt;Column 2&lt;/td&gt;<br />
<strong>&lt;/tr&gt;</strong><br />
&lt;/table&gt;</td>
<td>
<table border="2" cellspacing="2" cellpadding="2" width="100%">
<tbody>
<tr>
<td><strong>Column 1</strong></td>
<td><strong>Column 2</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>&lt;tt&gt;</td>
<td><strong>teletype</strong></td>
<td><strong>&lt;tt&gt;</strong>Example<strong>&lt;/tt&gt;</strong></td>
<td><tt>Example</tt></td>
</tr>
<tr>
<td>&lt;u&gt;</td>
<td><strong>underline</strong></td>
<td>&lt;u&gt;Example&lt;/u&gt;</td>
<td><span style="text-decoration:underline;">Example</span></td>
</tr>
<tr>
<td>&lt;ul&gt;</td>
<td><strong>unordered list</strong></td>
<td>Example 1:&lt;br&gt;<br />
&lt;br&gt;<br />
<strong>&lt;ul&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
<strong>&lt;/ul&gt;</strong><br />
&lt;br&gt;<br />
Example 2:&lt;br&gt;<br />
<strong>&lt;ul&gt;</strong><br />
&lt;li&gt;List item 1&lt;/li&gt;<br />
&lt;li&gt;List item 2&lt;/li&gt;<br />
<strong>&lt;ul&gt;</strong><br />
&lt;li&gt;List item 3&lt;/li&gt;<br />
&lt;li&gt;List item 4&lt;/li&gt;<br />
<strong>&lt;/ul&gt;<br />
&lt;/ul&gt;</strong></td>
<td>Example 1:</p>
<ul>
<li>List item 1</li>
<li>List item 2</li>
</ul>
<p>Example 2:</p>
<ul>
<li>List item 1</li>
<li>List item 2
<ul>
<li>List item 3</li>
<li>List item 4</li>
</ul>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2643/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2643&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/02/10/html-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>The ProFTPD Server</title>
		<link>http://mnlinux.wordpress.com/2010/01/19/the-proftpd-server/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/19/the-proftpd-server/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 16:19:54 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/2010/01/19/the-proftpd-server/</guid>
		<description><![CDATA[The ProFTPD Server Introduction to FTP and ProFTPD The ProFTPD Server Module Running ProFTPD from inetd or xinetd Using the ProFTPD Server module Creating virtual servers Setting up anonymous FTP Restricting users to their home directories Limiting who can login Setting directory listing options Message and readme files Setting per-directory options Restricting access to FTP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2642&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="patternScreen">
<div id="patternPageShadow">
<div id="patternPage">
<div id="patternOuter">
<div id="patternFloatWrap">
<div id="patternMain">
<div id="patternMainContents">
<div>
<div>
<div>
<ul>
<li><a href="?cover=print#The_ProFTPD_Server">The ProFTPD Server</a>
<ul>
<li><a href="?cover=print#Introduction_to_FTP_and_ProFTPD">Introduction to FTP and ProFTPD</a></li>
<li><a href="?cover=print#The_ProFTPD_Server_Module">The ProFTPD Server Module</a></li>
<li><a href="?cover=print#Running_ProFTPD_from_inetd_or_xi">Running ProFTPD from inetd or xinetd</a></li>
<li><a href="?cover=print#Using_the_ProFTPD_Server_module">Using the ProFTPD Server module</a></li>
<li><a href="?cover=print#Creating_virtual_servers">Creating virtual servers</a></li>
<li><a href="?cover=print#Setting_up_anonymous_FTP">Setting up anonymous FTP</a></li>
<li><a href="?cover=print#Restricting_users_to_their_home">Restricting users to their home directories</a></li>
<li><a href="?cover=print#Limiting_who_can_login">Limiting who can login</a></li>
<li><a href="?cover=print#Setting_directory_listing_option">Setting directory listing options</a></li>
<li><a href="?cover=print#Message_and_readme_files">Message and readme files</a></li>
<li><a href="?cover=print#Setting_per_directory_options">Setting per-directory options</a></li>
<li><a href="?cover=print#Restricting_access_to_FTP_comman">Restricting access to FTP commands</a></li>
<li><a href="?cover=print#Configuring_logging">Configuring logging</a></li>
<li><a href="?cover=print#Limiting_concurrent_logins">Limiting concurrent logins</a></li>
<li><a href="?cover=print#Restricting_clients_by_IP_addres">Restricting clients by IP address</a></li>
<li><a href="?cover=print#Limiting_uploads">Limiting uploads</a></li>
<li><a href="?cover=print#Manually_editing_directives">Manually editing directives</a></li>
</ul>
</li>
</ul>
</div>
<h2><a name="The_ProFTPD_Server"></a>The ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server</h2>
<p>This page explains the FTP protocol, and then describes how to set up the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> server and how to configure it for various purposes.</p>
<h3><a name="Introduction_to_FTP_and_ProFTPD"></a>Introduction to FTP and ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a></h3>
<p>FTP stands for file transfer protocol, and along with telnet and SMTP is one of the oldest protocols still in common use on the Internet. FTP is designed to allow client programs to read, write and delete files on a remote server, regardless of the operating system that the server is running. Essentially, it is a file sharing protocol, but unlike the more common NFS and SMB protocols, it is better suited to use over a slow or high latency network.</p>
<p>Typically, FTP is used to transfer files from one system to another. Sometimes those files are Linux distribution CD images or RPM packages, downloaded by various clients hosts on the Internet from a large server system that hosts them for everyone to access. Other times the files are pages for a web site, uploaded by an FTP client run by the sites owner to a system that runs both the web server and an FTP server.</p>
<div>
</div>
<p>Even though the FTP protocol has been mostly replaced by HTTP as a method of downloading files, it still has many advantages. The biggest is the ability of clients to upload files to the server, assuming that is has been configured to allow them. Another is a semi-standard directory listing format, which clients can use to fetch a list of files in a directory from the server.</p>
<p>When an FTP client connects to a server, it must first authenticate itself before any file transfers can take place. Often clients will login as the special anonymous user, which requires no password and is usually configured to be only able to download files. On Unix systems, most FTP servers allow any local user to login with the same username and password that he would use for telnet or SSH, and give his client access to the same files with the same permissions.</p>
<p>Another unique feature of the FTP protocol is its support for translating files between the data format used on the client and that used on the server. The most common use of this is the conversion of text files between the Unix, Windows and MacOS<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/MacOS?topicparent=Webmin.ProFTPDServer">?</a> formats, each of which uses different characters to represent the end of a line. This feature can be disabled for the transfer of binary files such as images, executables and ISOs, as it corrupts non-text data.</p>
<p>Many different FTP client programs exist, from the basic Unix ftp command to browsers like IE and Mozilla. Every modern operating system has at least one, and almost all include a client of some kind as standard. FTP servers are also plentiful, but this chapter focuses on only one - ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> , which in my opinion is the most flexible server available for Unix operating systems.</p>
<p>Even though all varieties of Unix ship with an FTP server as standard, the supplied server is usually either very basic and lacking in features, or the more powerful WU-FTPd. Although the latter has many configurable options, but is not as capable as ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> when it comes to virtual hosting, directory restrictions and locking users into their home directories.</p>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> generally uses a single configuration file, found at /etc/proftpd.conf. This file is made up of directives, each of which usually occupies a single line and has a name and value. Each directive sets a single configurable option, such as the name of a hidden file or the path to a welcome message. There are also special container directives for grouping other directives that apply only to a single virtual server or directory, which span multiple lines.</p>
<h3><a name="The_ProFTPD_Server_Module"></a>The ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server Module</h3>
<p>The ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server module icon can be found in Webmin under the Servers tab on the main menu. When you click on it, the module&#8217;s main page as shown in the image below will appear, assuming that you actually have the server installed.</p>
<p><img src="http://www.webmin.com/screenshots/chapter40/figure1.gif" alt="" /><br />
The ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server module</p>
<p>If the main page instead displays an error message like *The ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> server /usr/sbin/proftpd could not be found on your system*, then the server is probably not installed and thus the module cannot be used. Most Linux distributions include a ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> package on their CD or website, so use the Software Packages module (covered in chapter 12) to install it. If no package exists, download the source code from www.proftpd.org, compile and install it.</p>
<p>If you already have some other FTP server installed, it should be removed first so that they do not clash.</p>
<p>Another error that the main page might display is *The program /usr/sbin/ftpd does not appear to be the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> server*. This will occur if Webmin detects that some other FTP server is installed instead &#8211; if so, you will need to remove it and install ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> .</p>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> can be run in two different modes &#8211; either as a stand-alone daemon process that listens for FTP connections, or from a super-server like inetd or xinetd. The former accepts connections faster, but at the cost of more memory being used up by a process that is running all the time. The latter is better for systems that do not expect to receive a lot of FTP traffic, as the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> program only gets run when it is needed.</p>
<p>Because the stand-alone mode is easier to setup and because memory is plentiful on most systems, this chapter assumes that you will be running it in that mode. To start the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> server process, follow these steps :</p>
<ol>
<li>In the Internet Services and Protocols module (covered on InternetServicesAndProtocols<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/InternetServicesAndProtocols?topicparent=Webmin.ProFTPDServer">?</a> ), make sure that any existing service named ftp has<strong>Program disabled</strong> or <strong>No program assigned</strong> selected. This ensures that no FTP service will be run by inetd. If you disable a service, make sure to hit the <strong>Apply Changes</strong> button on that module&#8217;s main page to activate your changes.</li>
<li>In the Extended Internet Services module, make sure that any services with ftp in their names (such as wu-ftpd, proftpd, or vsftpd) have their<strong>Service enabled?</strong> field set to <strong>No</strong>. Again, you will need to hit the modules <strong>Apply Changes</strong> to activate any changes.</li>
<li>Back in the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server module, click on the Networking Options icon.</li>
<li>Select <strong>Stand-alone daemon</strong> from the <strong>Server type</strong> menu.</li>
<li>Click the <strong>Save</strong> button at the bottom of the page.</li>
<li>Back on the module&#8217;s main page, a button labeled <strong>Start Server</strong> should appear at the bottom. Hit it to start the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> daemon.</li>
<li>If you want the daemon to be re-started at boot time, use the Bootup and Shutdown module to create an action called proftpd that runs the command /usr/sbin/proftpd at boot time. The actual path may be /usr/local/sbin/proftpd or /usr/sbin/in.proftpd depending on which Linux distribution you are running or if you compiled and installed the program yourself instead of using a package. Also, some ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> packages may include a bootup script like this already, which you may just have to enable.</li>
</ol>
<p>Once ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> has been started, you can test it by using the command-line Unix FTP client to connect to your own system. Just run ftp localhost, and make sure that you can login as some user other than root. You can verify that the server really is ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> by checking the version displayed by the ftp command just before it prompts for a username, unless it has been configured by default not to display version information.</p>
<h3><a name="Running_ProFTPD_from_inetd_or_xi"></a>Running ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> from inetd or xinetd</h3>
<p>Setting up ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> to run from a super-server isn&#8217;t too hard either, and may be a good idea if your system is low on memory or hardly ever receives FTP connections. Before you can do this, you must kill any existing proftpd server process (easily done with Running Processes module), and disable or delete any action that starts it at boot time.</p>
<p>If your system uses the superior xinetd, follow these instructions to set up the FTP service. Because many packages include an /etc/xinetd.d configuration file for the server, some of the fields explained below may be already filled in correctly.</p>
<ol>
<li>Go to Webmin&#8217;s Networking category and click on the <strong>Extended Internet Services</strong> icon. If it does not exist, xinetd is not installed and you will need to set up the server using inetd instead.</li>
<li>On the module&#8217;s main page, check for an existing service named ftp or proftp. If one exists, click on it &#8211; otherwise, follow the <strong>Create a new internet service</strong> link above or below the table.</li>
<li>In the <strong>Service name</strong> field, enter <em>ftp</em> (unless it has already been filled in).</li>
<li>Make sure the <strong>Yes</strong> option is selected in the <strong>Service enabled?</strong> field.</li>
<li>Leave the <strong>Bind to address</strong> field set to <strong>All</strong>, and the <strong>Port number</strong> to <strong>Standard</strong> or <em>21</em>.</li>
<li>Select <strong>Stream</strong> from the <strong>Socket type</strong> menu, and <strong>Default</strong> or <strong>TCP</strong> from the <strong>Protocol</strong> list.</li>
<li>In the <strong>Service handled by</strong> field, select the <strong>Server program</strong> option and enter the path to the proftpd executable (such as <em>/usr/sbin/proftpd</em>) into the adjacent text box. The path depends on whether you installed the program from a package or compiled it from the source code.</li>
<li>In the <strong>Run as user</strong> field, enter <em>root</em>.</li>
<li>Select <strong>No</strong> for the <strong>Wait until complete?</strong> field.</li>
<li>Leave all the other fields set to their defaults, and hit the <strong>Save</strong> or <strong>Create</strong> button at the bottom of the form.</li>
<li>Back on the module&#8217;s main page, click the <strong>Apply Changes</strong> button below the list of services.</li>
</ol>
<p>Alternately, to set up an inetd service for ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> using the Internet Services and Protocols module, follow these steps :</p>
<ol>
<li>Go to Webmin&#8217;s Networking category and click on the <strong>Internet Services and Protocols</strong> icon. If it does not exist, your system is probably using xinetd instead &#8211; see the steps in the previous paragraph for instructions on how to configure it.</li>
<li>On the module&#8217;s main page, click on <strong>ftp</strong> in the <strong>Internet Services</strong> table. If it is not visible, enter ftp into the <strong>Edit service</strong> field and hit the button. Either way, the same page for editing the FTP protocol service will be displayed.</li>
<li>In the <strong>Server Program</strong> section, select <strong>Program enabled</strong>.</li>
<li>In the <strong>Program field</strong>, select the <strong>Command</strong> option and enter the full path to the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> server executable into the field next to it, such as<em>/usr/sbin/proftpd</em>. In the <strong>Args</strong> field, enter just <em>proftpd</em>. The path depends on whether you installed the program from a package or compiled it from the source code.</li>
<li>Set the <strong>Wait mode</strong> to <strong>Don&#8217;t wait</strong>, and enter <em>root</em> in the <strong>Execute as User</strong> field. All others can be left unchanged.</li>
<li>Click the <strong>Save</strong> button, and then back on the module&#8217;s main page hit <strong>Apply Changes</strong>.</li>
</ol>
<p>Once ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> has been setup to run from inetd or xinetd, you can test it by using the command-line Unix FTP client to connect to your own system. Just run ftp localhost, and make sure that you can login as some user other than root. If your test connection fails with an error like <strong>Service not available</strong>, the most likely cause is that ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> is configured to run as a stand-alone server. This can be easily fixed by following these steps :</p>
<ol>
<li>Go to the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server module and click on the <strong>Networking Options</strong> icon on the main page.</li>
<li>From the <strong>Server type</strong> menu in the form that appears, select <strong>Run from Inetd</strong>.</li>
<li>Hit the <strong>Save</strong> button at the bottom of the page.</li>
</ol>
<p>The instructions in the rest of this chapter will work fine no matter which mode ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> is running in. The only difference is that the <strong>Apply Changes</strong>button will not appear on the main page, as there is no need to re-start a server process for any configuration changes to take effect. Instead, changes will apply to the next FTP session that is started.</p>
<h3><a name="Using_the_ProFTPD_Server_module"></a>Using the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server module</h3>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> uses a very similar configuration file format to Apache, and so the user interface for this module is the same in many ways as the Apache Configuration module. At the highest level in the configuration are global settings that effect the entire server. Below them are virtual servers, and then anonymous FTP options, per-directory options and options that apply only to certain FTP commands.</p>
<p>The options that apply to each connection or FTP command are determined by the virtual server connected to, the type of login, the directory the requested file is in and the specific FTP command used. Options set by objects lower in the hierarchy override those at upper levels, so that you can prevent uploading to a server, but allow it for a directory. Similarly, options for a more specific directory (like /usr/local/upload) override those for its parents (such as /usr/local).</p>
<p>A special case is the default server, which defines settings for clients that do not connect to any specific virtual server. Unlike Apache, options set in the default server do not effect virtual servers. Instead if you want to specify some setting that effects all of them it must be in the special global section of the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> configuration. This applies to directory and FTP command specific options as well.</p>
<p>The module has a page for editing options for each object in the tree, which contains icons linking to objects further down. For example, on the virtual server options page are icons for the various categories of options that apply to that server (such as logging, and user and group), along with icons for any directories or FTP commands that have their own options within the virtual server. There is also an icon for options specific to anonymous FTP connections.</p>
<p>On each page in the hierarchy are forms for adding objects (such as a directory or group of FTP commands) under it, and a <strong>Configure</strong> icon for changing or deleting the current object. Every page also contains an <strong>Edit Directives</strong> icon allowing you to view and manually change the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> directives for the directory, virtual server or whatever it is that the page represents. The exception is the default server page, which has no such icons because it cannot be changed or deleted and because its directives cannot be separated from the rest of the configuration file.</p>
<p>At first glance, some of the forms in the module may appear daunting as they display fields for almost all of the available ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> options in some category related to an object. However, many of these options are extremely specialized and can be ignore most of the time. The steps in the various sections of this chapter explain which ones your need to modify to achieve some result &#8211; the others can be left alone, as their defaults are usually adequate.</p>
<p>Because each new version of ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> that is released supports new directives, this module can detect the version that you are running and adjust its user interface to display only those fields that are valid for your version. This means that the forms may not look exactly the same on all systems, and that some parts of the instructions in this chapter may not be valid for your FTP server if your are running an older release.</p>
<h3><a name="Creating_virtual_servers"></a>Creating virtual servers</h3>
<p>Probably ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> &#8216;s most useful feature is its support for virtual FTP servers. This allows you to define a totally different set of options that apply to clients connecting to a particular IP address. In most ways, they are similar to Apache&#8217;s IP-based virtual servers, which most website administrators should be familiar with.</p>
<p>Virtual servers are only really useful if your system has multiple IP addresses. Typically, this is done by adding additional virtual IP addresses to your Internet-connected network interface, as explained on the <a href="/Webmin/NetworkConfiguration">NetworkConfiguration</a> page. As usual, any extra IP addresses must be properly routed to your system &#8211; if you are connected to an ISP and assigned only a single static address, you cannot just add additional virtual interfaces and expect them to work. Unlike Apache, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> does not support name-based virtual servers because there is no provision in the FTP protocol for them. Clients never tell the server the hostname that they are connecting to, so the FTP server can only use the IP address that a connection was received on to determine which virtual server the client wants.</p>
<p>When your system receives an FTP connection, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will compare the connected address with those of all configured virtual servers. The first one to match defines the options that apply to the connection. If no match is found, the default server is used instead.</p>
<p>To add a new virtual FTP server to your system, the steps to follow are :</p>
<ol>
<li>In the Network Configuration module, add a new virtual IP address to the external network interface on your system. Make sure that it will be activated at boot time and is active now.</li>
<li>Back in the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> Server module, scroll down to the <strong>Create virtual server</strong> form at the bottom of the main page.</li>
<li>In the <strong>Address</strong> field, enter the IP address that you just assigned. It should not be used by any other virtual server already defined.</li>
<li>Leave the <strong>Port</strong> field set to <strong>Default</strong>.</li>
<li>In the <strong>Server name</strong> field, select the second radio button and enter a name for this server that will be displayed to connecting clients. For example, you could enter <em>Example Corporation&#8217;s FTP server</em>. If <strong>Default</strong> is selected, clients will see a message like ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> 1.2.2rc2 Server instead.</li>
<li>Hit the <strong>Create</strong> button to add the server. Once it has been created, you will be taken to the new server&#8217;s options page.</li>
<li>Return to the module&#8217;s main page and click the <strong>Apply Changes</strong> button to make it active.</li>
</ol>
<p>Once a virtual server has been created, you can set options that apply to it by clicking on its icon on the main page, then on one of the category icons. Some of these are explained in more detail later in the chapter. It is also possible to change the attributes of a virtual server by clicking on the <strong>Configure Virtual Server</strong> icon, editing the fields on the form (which have the same meanings as those on the creation form) and clicking <strong>Save</strong>. Or you can remove it altogether by hitting the <strong>Delete virtual server</strong> button on the configuration form.</p>
<h3><a name="Setting_up_anonymous_FTP"></a>Setting up anonymous FTP</h3>
<p>In its default configuration, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will generally allow all Unix users to login with their normal passwords and access all files on the system with the same permissions that they would have if logged in via telnet or SSH. Some packages also have anonymous FTP enabled for the default server as well, so that anyone can connect as the anonymous user and view files in a specific directory. To set up anonymous FTP for a new virtual server, configure what clients can do and which directories they can access, follow these steps :</p>
<ol>
<li>On the module&#8217;s main page, click on the icon for the default or virtual server that you want to configure anonymous FTP for.</li>
<li>On the virtual server options page, click on the <strong>Anonymous FTP</strong> icon. If this is the first time that it has been setup for this server, a small form will appear for entering anonymous FTP settings.</li>
<li>In the <strong>Limit to directory</strong> field, enter the directory that anonymous clients should be restricted to, such as <em>/home/example.com/anonftp</em>.</li>
<li>In the <strong>Access files as user</strong> option, select the second radio button and enter the name of an unprivileged Unix user such as <em>ftp</em> or <em>nobody</em>. Clients will not only be restricted to the chosen directory, but will also be only able to access files with the permissions of that Unix user. Naturally, you should make sure that it can actually read and list the directory and files that it contains. This user must not be in ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> &#8216;s denied list, or have an invalid shell. See the <strong>Limiting who can login</strong> section later in the chapter for more information on editing this list and allowing users with any shell.</li>
<li>If you are happy for clients to use the group permissions of the user set in the previous field, leave the <strong>Access files as group</strong> field set to <strong>Default</strong>. Otherwise, select the second radio button and enter a group name into its field.</li>
<li>Hit the <strong>Create</strong> button to set up the initial anonymous FTP configuration. Assuming it is successful, the browser will be re-directed to the anonymous FTP options page on which are icons for the various categories of configurable options that relate to anonymous FTP connections.</li>
<li>Click on <strong>Authentication</strong> and in the Username aliases table enter <em>anonymous</em> under <strong>Login username</strong>, and the name of the user that you chose in step 4 under <strong>Real username</strong>. This tells ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> that clients logging in as anonymous should be given the permissions of that user.</li>
<li>Click the <strong>Save</strong> button to return to the anonymous FTP options page.</li>
<li>In the <strong>FTP commands</strong> field, enter <em>WRITE</em> and hit the <strong>Create</strong> button to start the process of defining options that apply to FTP commands that modify data on the server. You will be taken to the per-command options page.</li>
<li>Click on the <strong>Access Control</strong> icon, and select <strong>Deny all clients</strong> in the <strong>Access control</strong> policy field. This tells ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> to block attempts by anonymous clients to upload, delete or rename files.</li>
<li>Click the <strong>Save</strong> button.</li>
<li>Return to the module&#8217;s main page, and hit <strong>Apply Changes</strong>. To make sure that everything is working, try logging into the virtual server as the anonymous user and downloading some files.</li>
</ol>
<p>If you are using your system to host multiple web and FTP sites for different customers, each can be given his own virtual anonymous server to make files available to people via FTP. Browsers assume that <a href="ftp://" target="_top">ftp://</a> URLs require an anonymous login and most don&#8217;t deal well with FTP servers that require authentication.</p>
<h3><a name="Restricting_users_to_their_home"></a><a name="Restricting_users_to_their_home_"></a>Restricting users to their home directories</h3>
<p>By default, clients that login to ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> as a valid Unix user (not anonymous) can browser your system&#8217;s entire filesystem, just as they could if the user logged in via SSH or telnet. However, this is not always desirable on a system that has multiple un-trusted users whom you want to prevent seeing each others files. Even though Unix permissions can be used to stop users listing each others&#8217; directories, they cause problems if you are also running a webserver and need its httpd user to have access to everyone&#8217;s files.</p>
<p>Fortunately, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> makes it easy to restrict users to their home directories or to some other directory. Because this only applies to FTP connections, it is pretty useless if those same users can telnet or SSH in. However, it is easy to allow a user to connect only via FTP by giving him a shell like /bin/false. On a virtual hosting server, users only really need to upload files for their websites and do not need Unix shell access at all. Just make sure that /bin/false or whatever non-functional shell that you choose is included in the /etc/shells file so that ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> does not deny the users access.</p>
<p>To restrict the directories that FTP clients can access, follow these steps :</p>
<ol>
<li>If you want to restriction to apply to only a single virtual server, click on its icon on the module&#8217;s main page and then on the <strong>Files and Directories</strong>icon on the virtual server options page. However, this is not advisable as it may allow users to avoid the restriction by connecting to another virtual server. Instead, you should just hit the <strong>Files and Directories</strong> icon in the <strong>Global Configuration</strong> section on the main page &#8211; any restrictions defined on it will apply to all servers. Either way, the page for configuring how the server lists directories and which ones are available (shown in the screenshot below) will appear.</li>
<li>The <strong>Limit users to directories</strong> field is actually a table that allows you to enter one directory limitation at a time. It will always have one blank row, and if this is the first such restriction you have created that is all it will contain. In the <strong>Directory</strong> column, select <strong>Home directory</strong> to if that is where you want users to be restricted to. Alternately, you can select the third radio button and enter a path like <em>/home</em> or <em>/var/www</em> to confine users to that directory. It is also possible to enter a path relative to the users&#8217; home directories, such as <em>~/public_html</em>. In the <strong>Unix groups</strong> column, either select <strong>Everyone</strong> to have the restriction apply to all users, or select the second radio button and enter a group name to have it apply only to the members of that group. Multiple groups can be entered by separating their names with commas, like <em>users,staff</em>.</li>
<li>Click the <strong>Save</strong> button to return to the virtual server options page. If you want to add another restriction (such as for a different group and directory), click on <strong>Files and Directories</strong> again and fill in the new blank row in the table.</li>
<li>When done, return to the module&#8217;s main page and hit the <strong>Apply Changes</strong> button to make the restrictions active.</li>
</ol>
<p><img src="http://www.webmin.com/screenshots/chapter40/figure3.gif" alt="" /><br />
The files and directories form</p>
<p>From now on when restricted users connect, they will be unable to see files outside the specified directory or even work out which directory they have been limited to. Unlike some other FTP servers that support this kind of restriction, there is no need to copy any files or libraries like /bin/ls into the directory, as ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> does not depend on any external programs.</p>
<h3><a name="Limiting_who_can_login"></a>Limiting who can login</h3>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> does not allow every Unix user to login, even if they have valid usernames and passwords. The separate /etc/ftpusers file lists users who are not allowed to authenticate, which typically include system accounts such as bin, daemon and uucp. In addition, there is a separate configuration option that controls whether the root user is allowed to login or not. By default it is not, because passwords sent by the FTP protocol are not encrypted and thus allowing root to authenticate could be a major security risk.</p>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> also by default prevents users without a valid shell from logging in. A valid shell is one listed in the /etc/shells file. This feature can be useful for preventing a large group of users from logging in, such as those that are supposed to be only able to connected to a POP3 server to download their email. However, it can be turned off if necessary.</p>
<p>To edit the list of denied users and other login restrictions, follow these steps :</p>
<ol>
<li>On the module&#8217;s main page, click on the <strong>Denied FTP Users</strong> icon. In the form that appears is a text box listing all blocked Unix users. Edit it to add or remove any that shouldn&#8217;t or should be allowed to login, and hit the <strong>Save</strong> button.</li>
<li>To allow the root user to connect, click on the <strong>Authentication</strong> icon and change the <strong>Allow login by root?</strong> field to <strong>Yes</strong>.</li>
<li>To allow users with unlisted shells to login, change the <strong>Only allow login by users with valid shell?</strong> field to <strong>Yes</strong> as well.</li>
<li>Hit the <strong>Save</strong> button to return to the main page, then click <strong>Apply Changes</strong> to make the new restrictions active.</li>
</ol>
<p>The options for allowing the root user and users with invalid shells to login can also be set on a per-virtual server basis as well, under the <strong>Authentication</strong>icon on the virtual server options page. However, it is not generally useful from a security point of view to allow clients of just a single server to login, as users can choose any server to connect to.</p>
<h3><a name="Setting_directory_listing_option"></a>Setting directory listing options</h3>
<p>Normally, when an FTP client requests a directory listing ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will return a complete accurate list in the format produced by the ls -l command. Sometimes though this gives away too much information about your system, such as the names of users and groups or symbolic link destinations. Often it can be useful to hide certain files that are not relevant to clients by must be kept in an FTP accessible directory for other reasons. This kind of information hiding is best applied to anonymous FTP users, as they should not be able to discover anything about your system that they do not need to know.</p>
<p>To change the format of directory listings, follow these steps :</p>
<ol>
<li>On the module&#8217;s main page, click on the icon for the default or virtual server that you want to change directory listings for to bring up its options page.</li>
<li>Assuming that you want to only change the listed information for anonymous clients, click on the <strong>Anonymous FTP</strong> icon to go to the anonymous FTP options page. Otherwise normal Unix users will be effected as well.</li>
<li>Click on the <strong>Files and Directories</strong> icon to bring up a form similar to the one in Figure 40-3 for setting the various listing options.</li>
<li>To hide files with certain group owners, enter one or more group names separated by spaces into the <strong>Hide files owned by groups</strong> field. Be aware that files hidden in this way can still be downloaded, renamed or deleted unless Unix permissions or the server&#8217;s configuration prevents it.</li>
<li>Similarly, to hide files with certain user ownership, fill in the <strong>Hide files owned by users</strong> field with a list of Unix usernames.</li>
<li>To hide files that the anonymous FTP user would not be able to read, change the <strong>Hide files that cannot be accessed?</strong> field to <strong>Yes</strong>.</li>
<li>To have ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> convert symbolic links in listings to their target file permissions and size, change the <strong>Show symbolic links?</strong> field to <strong>Yes</strong>. Normally both the link and target name are shown, and the displayed permissions and ownership are those of the link. However, even with this feature enabled the link target must still be within the anonymous FTP directory.</li>
<li>Normally, directory listings include the real user and group owners of files. To change this, set the <strong>Fake group in directory listings?</strong> field to <strong>Yes, as group</strong>. Then from the box below select either <strong>ftp</strong> to force the group owner to be always shown as ftp, or the third radio button to have it shown as whatever group you entered into the adjacent text box. The <strong>Connected group</strong> option only really makes sense for non-anonymous clients, as it makes files appear to be owned by the primary group of the connected user.</li>
<li>Similarly, you can change the Unix user owner of files with the <strong>Fake user in directory listings?</strong> field. If <strong>Connected user</strong> is chosen, files will appear to be owned by the user currently logged into the FTP server.</li>
<li>By default, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will show real Unix file permissions in listings. To force the display of fakes instead, select the second option in the <strong>Fake permissions in directory listings</strong> field and enter an octal number like <em>0644</em> of the kind used by the chmod command. This has no effect on the actual permissions that apply if a client tries to download or upload a file of course.</li>
<li>To hide dot files like .login and .profile in listings (as the ls command usually does), set the <strong>Show files starting with . in listings?</strong> field to <strong>Yes</strong>.</li>
<li>Finally, hit the <strong>Save</strong> button at the bottom of the page to update the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> configuration file.</li>
<li>Return to the module&#8217;s main page and press the <strong>Apply Changes</strong> button to make the settings active.</li>
</ol>
<p>As well as hiding certain files (as explained in steps 4 and 5), you can also prevent clients from reading or writing those files altogether. This can be done using the <strong>Make hidden files inaccessible?</strong> field, explained in the <strong>Restricting access to FTP commands</strong> section later in the chapter.</p>
<h3><a name="Message_and_readme_files"></a>Message and readme files</h3>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> can be configured to display messages to clients when they login or enter certain directories. This can be useful for notifying users of possible mirror sites, the locations of various common files on the server, and the details of the contents of a directory.</p>
<p>To set the messages that are displayed to clients, follow these steps :</p>
<ol>
<li>If you want the messages to be used by all virtual servers, click on the <strong>Authentication</strong> icon on the module&#8217;s main page. To set messages for a specific virtual server, click on its icon and then on <strong>Authentication</strong> on the server options page. Either way, the same form will be displayed. It is also possible to set most of the message file options below for only anonymous clients by clicking on the <strong>Anonymous FTP</strong> icon on the virtual server page and then on <strong>Authentication</strong>. Naturally, you cannot set the pre-login message because the server does not know if a client is anonymous or not at that stage.</li>
<li>In the <strong>Pre-login message file</strong> field, enter the full path to a file whose contents should be sent to clients as soon as they connect. If you don&#8217;t want any message file to be used at all, select <strong>None</strong> instead.</li>
<li>In the <strong>Post-login message</strong> file field, enter the path to a text file whose contents will be sent to clients after they have been properly authenticated. If the client is limited to a directory (because it logged in anonymously or has a home directory restriction in force), the file must be within and relative to that directory. If the filename is relative (like <em>welcome.txt</em>), it will be searched for in the directory that the client is initially placed in.</li>
<li>To set a message sent to clients when they request to disconnect, fill in the <strong>Logout message file</strong> field. Again, this must be relative to and under any directory that the client is restricted to.</li>
<li>If you have a restriction on the maximum number of simultaneous logins in force, you can set the message sent to clients blocked by it by filling in the <strong>Too many connections message file</strong> field. You should enter a full path, which can be anywhere on your system. See the <strong>Limiting concurrent logins</strong> section for more details.</li>
<li>Hit the <strong>Save</strong> button at the bottom of the page to go back to the global, virtual server or anonymous FTP options page.</li>
<li>Click on the <strong>Files and Directories</strong> icon on the same page.</li>
<li>In the <strong>Directory README filename</strong> field, enter a relative name like readme.txt that will be searched for in each directory that a client enters. If this is the first time the client has entered the directory in this session (or if the file has changed since the last time), its contents will be sent to the FTP client.</li>
<li>To have the server send a message to clients suggesting that a particular file should be read, fill in the <strong>Notify user of readme files matching</strong>field. If files in the directory matching the specified regular expression (like <em>README.*</em>) exist, a short message containing their names and modification times will be sent.</li>
<li>Click the <strong>Save</strong> button on this form, then return to the module&#8217;s main page. Finally click the <strong>Apply Changes</strong> button to activate the new message file settings.</li>
</ol>
<p>The files sent to the client by the options covered above can contain certain special cookies that start with a %, which are replaced by ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> with text determined at the time of sending. According to the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> documentation, the currently supported cookies are :</p>
<p>Not all may make sense in all situations though &#8211; for example, %U will not be set in the pre-login message file.</p>
<h3><a name="Setting_per_directory_options"></a>Setting per-directory options</h3>
<p>The ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> module allows you to set options that apply only to a specific directory, rather than globally or to an entire virtual server. This allows you to do things like hide a directory from clients, allow uploads by anonymous clients in just one location, or set the user and group ownership of files added to a directory.</p>
<p>To create a new set of per-directory options, follow these steps :</p>
<ol>
<li>If you want the options to apply to all virtual servers, enter the directory into the <strong>Directory path</strong> field in the <strong>Add per-directory options for</strong> form on the module&#8217;s main page and hit the <strong>Create</strong> button. Alternately, you can limit them to a particular virtual server by clicking on its icon and using the same form on the virtual server options page. Or you can define options that only apply to anonymous clients by hitting the <strong>Anonymous FTP</strong> icon for a virtual server and using its directory options creation form. In all cases, the directory should be entered as an absolute path like <em>/usr/local</em>. It is also possible to specify a path relative to the connecting user&#8217;s home directory, like <em>~/public_html</em>. You can even enter a path in a particular user&#8217;s home directory, like <em>~jcameron/www</em>. Normally, the options will apply to the directory and all its contents and subdirectories. To have them apply to only the contents and not the directory itself, add /* to the end of the path that you enter, like <em>/usr/local/*</em>.</li>
<li>After hitting <strong>Create</strong>, you will be taken to a page of option category icons for the directory as shown in Figure 40-4. As usual, clicking on these icons will take you to forms for configuring various settings that apply only to requests for and listings of that directory.</li>
<li>To totally deny access to clients, click on <strong>Access Control</strong> and change the <strong>Access control policy</strong> field to <strong>Deny all</strong> clients, then click <strong>Save</strong>.</li>
<li>Normally, files uploaded by clients will end up owned by the Unix user that the client logged in as. To change this, click on the <strong>User and Group</strong>icon and enter a username for the <strong>Owner of uploaded files</strong> field. Uploaded files&#8217; group will be the primary group of the specified user, unless you fill in the <strong>Group owner of uploaded files</strong> field as well. Again, click <strong>Save</strong> after making any changes to return to the per-directory options page.</li>
<li>To limit only the uploading or downloading of files in this directory, you will need to create a set of per-command options under it. The <strong>Restricting access to FTP commands</strong> section explains how.</li>
<li>To activate your changes for this directory, return to the module&#8217;s main page and hit the <strong>Apply Changes</strong> button.</li>
</ol>
<p><img src="http://www.webmin.com/screenshots/chapter40/figure4.gif" alt="" /><br />
The per-directory options page</p>
<p>You can also remove a directory options object from the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> configuration entirely by clicking on <strong>Configure Directory</strong> and then hitting the <strong>Delete directory config</strong> button. All settings and per-command options for the directory will be immediately and permanently deleted from the FTP server&#8217;s configuration.</p>
<p>If you define options for both a directory and one of its children (such as <em>/usr/local</em> and <em>/usr/local/bin</em>), ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will always give precedence to the most specific directory when deciding which options to apply to a particular client request. This means that a setting made for /usr/local will apply to a download of /usr/local/bin/foo, unless it is overridden by a setting for /usr/local/bin.</p>
<h3><a name="Restricting_access_to_FTP_comman"></a>Restricting access to FTP commands</h3>
<p>When a client wants to download or upload a file, list a directory or perform any other operation it sends a command to the server. ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> can be configured to restrict which commands a client can use for a particular virtual server or directory, or when logged in anonymously. However, before you can do this you need to have a basic understanding of which FTP commands exist and what they do. The table below lists the ones that are relevant for access control purposes :</p>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> allows you to define options that only apply to particular client commands or groups of commands. Typically, this is used to deny access to certain operations, such as uploading by anonymous FTP users. It is also possible to allow or deny only certain Unix users, or only clients connecting from certain addresses.</p>
<p>To create a new set of per-command options, follow these steps :</p>
<ol>
<li>First decide if the options should apply to commands only in a particular directory, only to clients of a virtual server, only to anonymous clients or to all users of your FTP server. On the per-directory, virtual server, anonymous FTP and main pages is a form titled <strong>Add per-command options for</strong>. In the <strong>FTP commands</strong> field, enter one or more commands from the list above, separated by spaces. When you hit the <strong>Create</strong> button, your browser will be taken to the page shown in Figure</li>
<li>-5.</li>
<li>Click on the <strong>Access Control</strong> icon to bring up a form for restricting who can use these commands.</li>
<li>To completely deny access to everyone, change the <strong>Access control policy</strong> field to <strong>Deny all clients</strong>. Conversely, to allow access select <strong>Allow all clients</strong> instead. This is most useful if you are editing options for commands within a directory and there is a set of options for the same commands at a higher level (such as for the virtual server or anonymous FTP) that denies access. For example, typically anonymous clients cannot use the WRITE commands, but you may want to allow it for a particular directory.</li>
<li>To only allow certain Unix users or members of certain group access to the commands, fill in the <strong>Only allow users</strong> and <strong>Only allow group</strong> fields. Multiple user or group names must be entered separated by spaces.</li>
<li>Similarly, to deny certain users and groups while allowing everyone else access to the FTP commands, fill in the <strong>Deny users</strong> and <strong>Deny groups</strong>fields.</li>
<li>The <strong>Restrict access</strong> table can be used to block clients from certain IP addresses by entering a series of rules. The three radio buttons at the top control the order in which entries in the table are evaluated. If <strong>Deny then allow</strong> is selected, any client that matches a Deny row or which does not match an Allow row will be blocked. Conversely, if <strong>Allow then deny</strong> is chosen only clients that match a Deny row and do not match an Allow will be prevented from using the commands. This mode is also the default. The table will always have one empty row for adding a new rule, and because this is a new set of per-commands options that is all it will contain. In the empty row select either <strong>Allow</strong> or <strong>Deny</strong> from the <strong>Action</strong> menu. Then from the <strong>Condition</strong> menu choose one of the following to determine which clients match and thus are allowed or denied. <strong>All *All clients match, no matter where they are from. *None *No clients match the rule. *IP address *Only clients from the IP address entered in the adjacent text field match. *Network *Only clients from the IP network entered match. The network address must be a partial IP with a trailing dot, like <em>192.168.1.</em>. *Hostname *Only clients whose IP address reverse-resolves to the entered name match. You can specify an entire domain by putting a dot at the front, like <em>.example.com</em>. If you want to add more than one rule, you will need to re-enter this page after saving so that a new blank row appears. To delete a rule, select the blank option from the *Action</strong> menu.</li>
<li>When you are done choosing who can use the FTP commands, hit the <strong>Save</strong> button. Then return to the module&#8217;s main page and click <strong>Apply Changes</strong> to make the restrictions active.</li>
</ol>
<p><img src="http://www.webmin.com/screenshots/chapter40/figure5.gif" alt="" /><br />
The per-command options page</p>
<h3><a name="Configuring_logging"></a>Configuring logging</h3>
<p>By default, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> logs all transfers to the file /var/log/xferlog in the standard FTP logging format (unless a different path has been selected at compile time). However, you can configure the server to log transfers to and from each virtual server differently, and anonymous FTP traffic as well. This is most useful in a virtual hosting environment, in which your system hosts FTP sites for many different customers.</p>
<p>It is also possible to define additional log files that use different formats, and optionally include only a subset of FTP commands. This can be useful if you only care about uploads, and don&#8217;t want your log files clogged up with useless information.</p>
<p>To configure where and how logs are written globally or for an individual virtual server, the steps to follow are :</p>
<ol>
<li>If you want to change the location of the global log file that is used for all transfers (unless overridden by a virtual server), click on the <strong>Logging</strong>icon on the main page. Alternately, if you want to configure a specific virtual server to use a different log file, click on its icon and then on <strong>Logging</strong>on the virtual server options page. To change the logging settings for anonymous clients only, click on a virtual server icon, then on <strong>Anonymous FTP</strong> and finally on the <strong>Logging</strong> icon on the anonymous FTP options page.</li>
<li>On the resulting logging options form, the <strong>FTP transfers logfile</strong> field controls where logs are written to. To specify a file, select the last option and enter a full path like <em>/var/log/example.com.xfers</em> into the adjacent text field. To turn off logging altogether, select <strong>Logging disabled</strong>. To use the global default, select the <strong>Default</strong> option (if you are editing the global logging settings, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will use the compiled-in default log file /var/log/xferlog).</li>
<li>The <strong>Custom logfiles</strong> table can be used to define additional logs for specific commands and with arbitrary formats. As usual, it will always have one empty row for adding a new custom log file. To add one, fill in the fields under these headings : <strong>Logfile *The full path to the log file, such as<em>/home/example.com/ftplog</em>. *For FTP commands *If *All</strong> is selected, all FTP commands will be logged. However, if you choose the second option only those command classes in the adjacent text box will be included. Recognized classes are NONE (no commands), ALL (all commands), INFO (information requests), DIRS (directory navigation), READ (file download), WRITE (file upload and directory creation), SITE (non-standard commands like CHMOD) and MISC (other miscellaneous commands). Multiple classes must be separated by commas, like <em>READ,WRITE</em>. You cannot use the names documented in the <strong>Restricting access to FTP commands</strong> section. <strong>Log format *If *Default</strong> is selected, the standard FTP log format will be used. But if the second option is chosen, you must enter a recognized log format name into the text box. The next paragraph explains how to set up named log formats. Because only one empty row appears in the table, you can only add one custom log at a time. To add more, click on the <strong>Logging</strong> icon again after saving and fill in the new blank row. To delete a custom log, just clear out its field in the <strong>Logfile</strong>column.</li>
<li>Hit the <strong>Save</strong> button to save the new settings, and then <strong>Apply Changes</strong> on the main page to activate them.</li>
</ol>
<p>If you want to use your own custom formats for log files, they must first be defined globally. The steps to create a format are :</p>
<ol>
<li>On the module&#8217;s main page, click on the <strong>Logging</strong> icon to bring up the global log file options page.</li>
<li>The <strong>Custom log formats</strong> table is for defining your own formats. In the first blank field under <strong>Format name</strong>, enter a short name for your new format such as <em>filesonly</em>. In the field next to it under <strong>Format string</strong>, enter text containing the log codes recognized by ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> , like <em>Downloaded %f at %t</em>. The special codes in the string starting with % are replaced by the server with information about the command, as explained in the table below. As usual, you can add more than one custom format by re-entering the page after saving so that a new blank row appears. A format can be deleted by just clearing out its <strong>Format name</strong> field.</li>
<li>Click the <strong>Save</strong> button to return to the main page, and then click <strong>Apply Changes</strong>. The new format can now be used in custom log files.</li>
</ol>
<h3><a name="Limiting_concurrent_logins"></a>Limiting concurrent logins</h3>
<p>If your system is configured to allow anonymous FTP logins and you expect to receive a lot of traffic, it makes sense to limit the number of connections that can be open to the FTP server at any one time. This puts a ceiling on the network and CPU load that FTP transfers can generate, which is important if the system is being used for some other purpose (such as running a web server).</p>
<p>This limit can be set globally, on a per-virtual server basis or just for anonymous clients. This means that you can set a limit that applies to all servers, and then increase or decrease it for a particular virtual host. Or you can set a lower limit for anonymous clients versus those that have valid logins.</p>
<p>ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> can also be configured to limit the number of concurrent connections that a single client host can have. This is useful if you want to stop people downloading more than one file at a time from your server, and thus taking more than their fair share of bandwidth.</p>
<p>To set a connection limit for your server, follow these steps :</p>
<ol>
<li>If you want to set a global limit, click on the <strong>Networking Options</strong> icon on the module&#8217;s main page. To set a limit for a single virtual server, click on its icon and then on <strong>Networking Options</strong>. To define a limit that applies only to anonymous clients, click on the icon for a virtual server, then on<strong>Anonymous FTP</strong> and finally on the <strong>Networking Options</strong> icon on the anonymous FTP options page.</li>
<li>On the form that appears, find the <strong>Maximum concurrent logins</strong> field. To set a limit, select the third radio button and enter a number in the text box next to it. Alternately, you can select <strong>Unlimited</strong> to turn off any restriction that applies to this virtual server that has been set globally.</li>
<li>To define an error message sent to clients that try to connect when the limit has been reached, enter it into the <strong>Login error message</strong> box in the<strong>Maximum concurrent logins</strong> field. If the message contains the special code %m it will be replaced with the maximum allowed number.</li>
<li>To set the per-client host limit, fill in the <strong>Maximum concurrent logins per host</strong> field in the same way. It also has a <strong>Login error message</strong> box that can be used to set a message sent to FTP clients that exceed the limit.</li>
<li>If you are editing the global networking options, you can also set a limit on the total number of ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> sub-processes that can be active at any one time. This is useful for protecting your system from denial-of-service using hundreds of useless connections. Just select the second option for the <strong>Maximum concurrent sessions</strong> field and enter a number into its adjacent text box. If <strong>Default</strong> is selected, no limit will be enforced. If you are running the server from a super-server like inetd or xinetd, this limit will have no effect. Fortunately, both those servers have configuration options that can be used to achieve the same result.</li>
<li>When you are done editing client restrictions, hit the <strong>Save *button at the bottom of the form to update the ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> configuration, and then the *Apply Changes</strong> button back on the main page.</li>
</ol>
<h3><a name="Restricting_clients_by_IP_addres"></a>Restricting clients by IP address</h3>
<p>By default, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> will allow clients to connect from any IP address. However, like everything else this is configurable so that you can restrict access to systems on your own network, either globally or for particular virtual servers. This comes in handy if you are setting up an FTP server that is for internal use only, even though the system it is running on is accessible from the Internet.</p>
<p>To restrict clients by address, follow these steps :</p>
<ol>
<li>To create a global restriction that will apply to all virtual servers, enter <em>LOGIN</em> into the <strong>FTP commands</strong> field of the <strong>Add per-command options for</strong> form on the module&#8217;s main page, then click <strong>Create</strong>. If you only want to limit who can connect to a particular virtual server, click on its icon before entering <em>LOGIN</em> into the same form on the virtual server options page.</li>
<li>Regardless of what level the restriction is being defined at, you will be taken to the per-command options page shown above. Click on the <strong>Access Control</strong> icon to go to the aptly-named access control form.</li>
<li>The <strong>Restrict access</strong> table can be used to block clients from certain IP addresses by entering a series of rules. The three radio buttons at the top control the order in which entries in the table are evaluated. If <strong>Deny then allow</strong> is selected, any client that matches a Deny row or which does not match an Allow row will be blocked. Conversely, if <strong>Allow then deny</strong> is chosen only clients that match a Deny row and do not match an Allow will be prevented from logging in. This mode is also the default. The table will always have one empty row for adding a new rule, and because this is a new set of per-commands options that is all it will initially contain. In the empty row select either <strong>Allow</strong> or <strong>Deny</strong> from the <strong>Action</strong> menu. Then from the <strong>Condition</strong> menu choose one of the following to determine which clients match and thus are allowed or denied.
<ul>
<li><strong>All</strong> All clients match, no matter where they are from. *None *No clients match the rule.</li>
<li><strong>IP address</strong> Only clients from the IP address entered in the adjacent text field match.</li>
<li><strong>Network</strong> Only clients from the IP network entered match. The network address must be a partial IP with a trailing dot, like <em>192.168.1.</em>.</li>
<li><strong>Hostname</strong> Only clients whose IP address reverse-resolves to the entered name match. You can specify an entire domain by putting a dot at the front, like <em>.example.com</em>. If you want to add more than one rule, you will need to re-enter this page after saving so that a new blank row appears. To delete a rule, select the blank option from the <strong>Action</strong> menu.</li>
</ul>
</li>
<li>When you are finished entering client restrictions, hit the <strong>Save</strong> button at the bottom of the form. Then return to the main page and click <strong>Save and Apply</strong> to activate them.</li>
</ol>
<p>Commonly, you will want to give only clients on a single network access. To do this, select the <strong>Deny then allow</strong> option, choose <strong>Allow</strong> from the <strong>Action menu</strong>, <strong>Network</strong> from the <strong>Condition</strong> menu and enter the network address with a trailing dot (like 10.254.1.) into the condition text box.</p>
<h3><a name="Limiting_uploads"></a>Limiting uploads</h3>
<p>If clients are allowed to upload files to your server, they will be able to choose any name that they wish for uploaded files. Sometimes this is not desirable though &#8211; you may want to allow the storing of only image files whose names end with .gif or .jpg, or prevent the uploading of Windows executables with filenames ending in .exe or .com. Fortunately, ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> has configuration options that allow you to set this up.</p>
<p>There are also several other settings that apply to uploads, which control whether clients are allowed to overwrite files and if partially transferred files are visible. All can be set globally, for a single virtual server or for anonymous clients only. The steps to set these options are :</p>
<ol>
<li>If you want to the settings to be global, click on the <strong>Files and Directories</strong> icon on the module&#8217;s main page. To have them apply to just a single virtual server, click on its icon and then on <strong>Files and Directories</strong>. Or to effect just clients that login anonymously, click on a virtual server icon, then on <strong>Anonymous FTP</strong> and finally on <strong>Files and Directories</strong> icon on the virtual server options page. No matter which configuration object you chose, the files and directories form that appears will be almost identical.</li>
<li>To hide files that are in the process of being uploaded, change the <strong>Hide files during upload?</strong> field to <strong>Yes</strong>. This tells ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> to use a temporary file whose name starts with .in. for transferred data, which is only renamed to the real filename when the upload is complete. This prevents incomplete partial uploads, and stops files being downloaded or accessed while they are still being sent.</li>
<li>To have ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> delete uploaded files that are not fully transferred, select <strong>Yes</strong> for the <strong>Delete aborted uploads?</strong> field. Again, this prevents corrupt partially uploaded files from being created on your system.</li>
<li>To allow users to only create files whose relative names match a certain pattern, fill in the <strong>Allowed uploaded filename regex</strong> field with a Perl regular expression. For example, to only allow GIF files you might enter <em>^.*\.gif$</em>. Because clients are normally allowed to rename files, this option alone is not enough to stop the creation of invalid filenames. You will also need to block access to the RNFR command, as explained in the<strong>Restricting access to FTP commands</strong> section.</li>
<li>Alternately, you can block the use of certain filenames by filling in the <strong>Denied uploaded filename regex</strong> field with a regular expression like<em>^.*\.exe$</em>. If both this and the previous field are set, only files that match the allow expression but not this deny expression will be permitted. Another common use of this option is blocking the upload of .ftpaccess or .htaccess files, which set per-directory ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> and Apache options.</li>
<li>Hit the <strong>Save</strong> button at the bottom of the page.</li>
<li>If you want to stop clients overwriting files with new uploads, click on the Access Control icon and change the <strong>Allow overwriting of files?</strong> field to<strong>No</strong>. This can be useful on an server that allows anonymous users to upload to a particular directory, perhaps for incoming files of some kind. Don&#8217;t forget to click <strong>Save</strong> if you make this change.</li>
<li>Return to the module&#8217;s main page and hit the <strong>Apply Changes</strong> button to activate your new filename restrictions.</li>
</ol>
<h3><a name="Manually_editing_directives"></a>Manually editing directives</h3>
<p>If you prefer to manually edit your ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> configuration file in some cases or just want to see which directives an action in Webmin has set, you can do so using this module. Except for the default server, every object&#8217;s options page (virtual server, per-directory and per-command) has an icon labeled<strong>Edit Directives</strong>. When clicked on it will take you to a form containing a large text box showing the lines from the configuration file in the section related to the object. You can edit them to your heart&#8217;s content, then click the <strong>Save</strong> button to update the actual file. Be aware though that no validation of your input is done. Also, you will need to use the <strong>Apply Changes</strong> button on the module&#8217;s main page to activate any changes, as usual.</p>
<p>To view and edit the entire ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> configuration, use the *Edit Config Files* icon on the module&#8217;s main page. This will bring up a similar form, but showing and allowing the editing of a complete configuration file at once. Because ProFTPD<a title="Create this topic" rel="nofollow" href="/twiki/bin/edit/Webmin/ProFTPD?topicparent=Webmin.ProFTPDServer">?</a> can read multiple configuration files (though the use of Include directives), at the top of the form is a button labeled <strong>Edit Directives in File</strong> with a menu of filenames next to it. To switch the view to a different file, just select the one you want and hit the button. Normally though only a single proftpd.conf file will be used.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="patternBottomBar"></div>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2642/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2642&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/19/the-proftpd-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>

		<media:content url="http://www.webmin.com/screenshots/chapter40/figure1.gif" medium="image" />

		<media:content url="http://www.webmin.com/screenshots/chapter40/figure3.gif" medium="image" />

		<media:content url="http://www.webmin.com/screenshots/chapter40/figure4.gif" medium="image" />

		<media:content url="http://www.webmin.com/screenshots/chapter40/figure5.gif" medium="image" />
	</item>
		<item>
		<title>PHP MySQL: Creating Form Insert Data</title>
		<link>http://mnlinux.wordpress.com/2010/01/17/php-mysql-creating-form-insert-data/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/17/php-mysql-creating-form-insert-data/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 16:19:17 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2640</guid>
		<description><![CDATA[01 &#60;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 02 Transitional//EN" 03 "http://www.w3.org/TR/html4/loose.dtd"&#62; 04 &#60;html&#62; 05 06 &#60;head&#62; 07 &#60;title&#62;Form Input Data&#60;/title&#62; 08 &#60;/head&#62; 09 10 &#60;body&#62; 11 &#60;table border="1"&#62; 12 &#60;tr&#62; 13 &#60;td align="center"&#62;Form Input Employees Data&#60;/td&#62; 14 &#60;/tr&#62; 15 &#60;tr&#62; 16 &#60;td&#62; 17 &#60;table&#62; 18 &#60;form method="post" action="input.php"&#62; 19 &#60;tr&#62; 20 &#60;td&#62;Name&#60;/td&#62; 21 &#60;td&#62;&#60;input type="text" [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2640&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td><code>01</code></td>
<td><code>&lt;!DOCTYPE HTML PUBLIC "-</code><code>//W3C//DTD HTML 4.01 </code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>02</code></td>
<td><code>Transitional</code><code>//EN" </code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>03</code></td>
<td><code>"<a href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>"</code><code>&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>04</code></td>
<td><code>&lt;html&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>05</code></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>06</code></td>
<td><code>&lt;head&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>07</code></td>
<td><code>&lt;title&gt;Form Input Data&lt;/title&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>08</code></td>
<td><code>&lt;/head&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>09</code></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>10</code></td>
<td><code>&lt;body&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>11</code></td>
<td><code>&lt;table border=</code><code>"1"</code><code>&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>12</code></td>
<td><code> </code><code>&lt;tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>13</code></td>
<td><code> </code><code>&lt;td align=</code><code>"center"</code><code>&gt;Form Input Employees Data&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>14</code></td>
<td><code> </code><code>&lt;/tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>15</code></td>
<td><code> </code><code>&lt;tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>16</code></td>
<td><code> </code><code>&lt;td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>17</code></td>
<td><code> </code><code>&lt;table&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>18</code></td>
<td><code> </code><code>&lt;form method=</code><code>"post"</code> <code>action=</code><code>"input.php"</code><code>&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>19</code></td>
<td><code> </code><code>&lt;tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>20</code></td>
<td><code> </code><code>&lt;td&gt;Name&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>21</code></td>
<td><code> </code><code>&lt;td&gt;&lt;input type=</code><code>"text"</code> <code>name=</code><code>"name"</code> <code>size=</code><code>"20"</code><code>&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>22</code></td>
<td><code> </code><code>&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>23</code></td>
<td><code> </code><code>&lt;/tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>24</code></td>
<td><code> </code><code>&lt;tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>25</code></td>
<td><code> </code><code>&lt;td&gt;Address&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>26</code></td>
<td><code> </code><code>&lt;td&gt;&lt;input type=</code><code>"text"</code> <code>name=</code><code>"address"</code> <code>size=</code><code>"40"</code><code>&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>27</code></td>
<td><code> </code><code>&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>28</code></td>
<td><code> </code><code>&lt;/tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>29</code></td>
<td><code> </code><code>&lt;tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>30</code></td>
<td><code> </code><code>&lt;td&gt;&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>31</code></td>
<td><code> </code><code>&lt;td align=</code><code>"right"</code><code>&gt;&lt;input type=</code><code>"submit"</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>32</code></td>
<td><code> </code><code>name=</code><code>"submit"</code> <code>value=</code><code>"Sent"</code><code>&gt;&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>33</code></td>
<td><code> </code><code>&lt;/tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>34</code></td>
<td><code> </code><code>&lt;/table&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>35</code></td>
<td><code> </code><code>&lt;/td&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>36</code></td>
<td><code> </code><code>&lt;/tr&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>37</code></td>
<td><code>&lt;/table&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>38</code></td>
<td><code>&lt;/body&gt;</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>39</code></td>
<td><code>&lt;/html&gt;</code></td>
</tr>
</tbody>
</table>
<p>The result:</p>
<p><img src="http://farm3.static.flickr.com/2395/2309560719_d25c303d15.jpg?v=0" alt="php mysql form input data" /></p>
<p>This HTML form will send two variable, $name and $address variable, into input.php file as describe in the ACTION parameter of FORM HTML.</p>
<table>
<tbody>
<tr>
<td><code>01</code></td>
<td><code>&lt;?</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>02</code></td>
<td><code>//the example of inserting data with variable from HTML form</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>03</code></td>
<td><code>//input.php</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>04</code></td>
<td><code>mysql_connect(</code><code>"localhost"</code><code>,</code><code>"root"</code><code>,</code><code>"admin"</code><code>);</code><code>//database connection</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>05</code></td>
<td><code>mysql_select_db(</code><code>"employees"</code><code>);</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>06</code></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>07</code></td>
<td><code>//inserting data order</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>08</code></td>
<td><code>$order</code> <code>= "INSERT INTO data_employees</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>09</code></td>
<td><code> </code><code>(name, address)</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>10</code></td>
<td><code> </code><code>VALUES</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>11</code></td>
<td><code> </code><code>(</code><code>'$_POST[name]'</code><code>,</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>12</code></td>
<td><code> </code><code>'$_POST[address]'</code><code>)";</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>13</code></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>14</code></td>
<td><code>//declare in the order variable</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>15</code></td>
<td><code>$result</code> <code>= mysql_query(</code><code>$order</code><code>); </code><code>//order executes</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>16</code></td>
<td><code>if</code><code>(</code><code>$result</code><code>){</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>17</code></td>
<td><code> </code><code>echo</code><code>(</code><code>"&lt;br&gt;Input data is succeed"</code><code>);</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>18</code></td>
<td><code>} </code><code>else</code><code>{</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>19</code></td>
<td><code> </code><code>echo</code><code>(</code><code>"&lt;br&gt;Input data is fail"</code><code>);</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>20</code></td>
<td><code>}</code></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><code>21</code></td>
<td><code>?&gt;</code></td>
</tr>
</tbody>
</table>
<p>After you have already made input.php, fill the input data and then click the sent button such as:</p>
<p><img src="http://farm3.static.flickr.com/2072/2309560723_5133f5394e.jpg?v=0" alt="PHP mysql basic insert data" /></p>
<p>For the result:</p>
<p><img src="http://farm4.static.flickr.com/3032/2309560727_4075c63e3d.jpg?v=0" alt="PHP mysql basic insert data" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2640/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2640&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/17/php-mysql-creating-form-insert-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2395/2309560719_d25c303d15.jpg?v=0" medium="image">
			<media:title type="html">php mysql form input data</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2072/2309560723_5133f5394e.jpg?v=0" medium="image">
			<media:title type="html">PHP mysql basic insert data</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3032/2309560727_4075c63e3d.jpg?v=0" medium="image">
			<media:title type="html">PHP mysql basic insert data</media:title>
		</media:content>
	</item>
		<item>
		<title>Postfix with LDAP</title>
		<link>http://mnlinux.wordpress.com/2010/01/16/postfix-with-ldap/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/16/postfix-with-ldap/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 11:33:26 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[Mail]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2632</guid>
		<description><![CDATA[Postfix’s LDAP Suppport Postfix stores aliases, virtual address mappings and other configuration tables in maps, which are typically DBM format files built from text files. However, with the right plugin modules it can use a MySQL or LDAP database instead, which can be queried over the network. On Debian or Ubuntu systems, the command to install [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2632&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><strong>Postfix’s LDAP Suppport</strong></h2>
<p>Postfix stores aliases, virtual address mappings and other configuration tables in <strong>maps</strong>, which are typically DBM format files built from text files. However, with the right plugin modules it can use a MySQL or LDAP database instead, which can be queried over the network.</p>
<p>On Debian or Ubuntu systems, the command to install LDAP support for Postfix is :</p>
<pre><span style="color:#ff6600;">apt-get install postfix-ldap</span></pre>
<p>On other systems, Postfix may come with LDAP support already enabled. If not, you may need to download and compile it manually. To check if your Postfix supports LDAP, run the command :</p>
<pre>postconf -m</pre>
<p>and look for ldap in the output.</p>
<h3>Setting up the LDAP Schema</h3>
<p>I’ve found that there doesn’t seem to be any consistent agreement on which LDAP object class and attributes to use for Postfix objects. However, the <code>misc</code> schema that comes with OpenLDAP defines a<code>inetLocalMailRecipient</code> class that is almost good enough.</p>
<p>To configure the schema fully, do the following :</p>
<ol>
<li>Go to the <strong>LDAP Server</strong> module, and click on <strong><span style="color:#ff6600;">Manage Schema</span></strong>.</li>
<li>Check the box next to the <code>misc</code> schema (if it isn’t already), and click <strong>Save</strong>.</li>
<li>Go back to the schema page, and click the <strong>Edit</strong> link next to the <code>misc</code> schema.</li>
<li>Find the definition for the <code>inetLocalMailRecipient</code> class, which should be like :
<pre>objectclass ( 2.16.840.1.113730.3.2.147
	NAME 'inetLocalMailRecipient'
	DESC 'Internet local mail recipient'
	SUP top AUXILIARY
	MAY	( mailLocalAddress $ mailHost $ mailRoutingAddress ) )</pre>
</li>
<li>Change the <code>AUXILIARY</code> to <code>STRUCTURAL</code>, and click <strong>Save</strong>.</li>
<li>Go back to the module’s main page, and click <strong>Apply Configuration</strong>.</li>
</ol>
<h3>Creating LDAP Trees for Postfix</h3>
<p>Each Postfix map should have a separate sub-tree in the LDAP database.</p>
<ol>
<li>Click on <strong>Create Tree</strong>.</li>
<li>Select <strong>Distinguished name</strong>, and in the adjacent field enter something like <em><span style="color:#ff6600;">dc=Users,dc=foo,dc=com</span></em><em> or dc=Mail,dc=foo,dc=com</em></li>
<li>Click <strong>Create</strong>.</li>
</ol>
<h3>Configuring the Webmin Postfix Module</h3>
<p>Now that the LDAP server is set, Postfix has to be told to talk to it. The first step is to have it use the correct LDAP object class, by doing :</p>
<ol>
<li>Go to the <strong><span style="color:#ff6600;">Postfix Mail Server</span></strong> module, and click on <strong><span style="color:#ff6600;">Module Config</span></strong>.</li>
<li>Find the <strong>LDAP options</strong> section.</li>
<li>Change the <strong>Object classes for maps</strong> to <em>inetLocalMailRecipient</em> .</li>
<li>Change the <strong>Key attribute for map objects</strong> to <em>mailLocalAddress</em> .</li>
<li>For <strong>Create separate DN for each domain?</strong>, select <strong>No</strong> .</li>
<li>Click <strong>Save</strong>.</li>
</ol>
<p>Now you need to edit the maps for aliases and virtual domains to add LDAP data sources, as follows :</p>
<ol>
<li>Go to the <strong><span style="color:#ff6600;">Postfix Mail Server</span></strong> module, and click on <strong><span style="color:#ff6600;">Mail Aliases</span></strong>.</li>
<li>Click the <strong>…</strong> button next to <strong>Alias databases used by the local delivery agent</strong>. By default, this field will just contain something like <code>hash:/etc/aliases</code>.</li>
<li>In the popup window, scroll down to the <strong><span style="color:#ff6600;">Map source 2</span></strong> section and select <strong>LDAP server</strong>.</li>
<li>Enter your LDAP server’s hostname in the <strong>LDAP server hosts</strong> field.</li>
<li>Set the <strong>LDAP search base DN</strong> to the DN you created previously, such as <em><span style="color:#ff6600;">dc=Users,dc=foo,dc=com</span></em><em>, or dc=Mail,dc=foo,dc=com</em> .</li>
<li>Set the <strong>Query filter</strong> to <em>mailLocalAddress=%s</em> .</li>
<li>Set the <strong>Result attribute</strong> to <em>mailRoutingAddress</em> .</li>
<li>In the <strong>Server login</strong> field, enter your LDAP server’s administration login, like <em>cn=Admin,dc=foo,dc=com</em> .</li>
<li>Enter the LDAP administration password in the <strong>Server password</strong> field.</li>
<li>Click <strong>Save</strong> at the bottom of the popup window.</li>
<li>Click <strong>Save</strong> again back on the <strong>Mail Aliases</strong> page.</li>
</ol>
<p>It is also possible to use a different login, such as an LDAP account who just has read-write access to the aliases sub-tree.</p>
<p>To verify that everything is working, try adding an alias using Webmin and ensure that it shows up in the list of aliases. Then send email to the new alias, and check that it is forwarded correctly. If not, check the Postfix logs in <code>/var/log/mail*</code> for errors that explain why it couldn’t talk to the LDAP database.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2632/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2632&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/16/postfix-with-ldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>LDAP with Webmin</title>
		<link>http://mnlinux.wordpress.com/2010/01/16/ldap-with-webmin/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/16/ldap-with-webmin/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 11:05:48 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2626</guid>
		<description><![CDATA[Combining Virtualmin and LDAP Introduction to LDAP LDAP Access Control Installing an LDAP Server Setting up Webmin&#8217;s LDAP Server Module Creating LDAP Trees Storing Users in LDAP Introduction to NSS Introduction to PAM Setting Up an LDAP Client System Setting up PAM PAM Setup On Debian and Ubuntu PAM Setup on CentOS, Fedora and Redhat [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2626&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#combining_virtualmin_and_ldap">Combining Virtualmin and LDAP</a>
<ul>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#introduction_to_ldap">Introduction to LDAP</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#ldap_access_control">LDAP Access Control</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#installing_an_ldap_server">Installing an LDAP Server</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#setting_up_webmin_s_ldap_server_module">Setting up Webmin&#8217;s LDAP Server Module</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#creating_ldap_trees">Creating LDAP Trees</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#storing_users_in_ldap">Storing Users in LDAP</a>
<ul>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#introduction_to_nss">Introduction to NSS</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#introduction_to_pam">Introduction to PAM</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#setting_up_an_ldap_client_system">Setting Up an LDAP Client System</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#setting_up_pam">Setting up PAM</a>
<ul>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#pam_setup_on_debian_and_ubuntu">PAM Setup On Debian and Ubuntu</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#pam_setup_on_centos_fedora_and_redhat">PAM Setup on CentOS, Fedora and Redhat</a></li>
</ul>
</li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#setting_up_webmin_s_ldap_users_and_groups_module">Setting Up Webmin&#8217;s LDAP Users and Groups Module</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#creating_ldap_users_with_virtualmin">Creating LDAP Users with Virtualmin</a></li>
</ul>
</li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#storing_email_aliases_in_ldap">Storing Email Aliases in LDAP</a>
<ul>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#postfix_s_ldap_suppport">Postfix&#8217;s LDAP Suppport</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#setting_up_the_ldap_schema">Setting up the LDAP Schema</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#creating_ldap_trees_for_postfix">Creating LDAP Trees for Postfix</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#configuring_the_webmin_postfix_module">Configuring the Webmin Postfix Module</a></li>
<li><a href="http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,combining_virtualmin_and_ldap/#creating_ldap_aliases_with_virtualmin">Creating LDAP Aliases with Virtualmin</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h1>Combining Virtualmin and LDAP</h1>
<p>This documentation explains how Virtualmin can be setup to store users and mail aliases in an LDAP database, rather than using files in <code>/etc</code> as it does by default. It is particularly useful when you want to spread the load of virtual hosting across multiple systems, and need to them to all stay in sync.</p>
<h2>Introduction to LDAP</h2>
<p>LDAP (Lightweight Directory Access Protocol) is a way for clients to query and update a flexibly structured heirachial database. In the Unix world, it is most commonly used to distribute user and group information from a central server to many client systems, so that users can login to any client. Typically it is combined with NFS, which makes user home directories available on all clients too.</p>
<p>Each object in the database has a DN (distinguished name), which is formatted like:</p>
<pre>cn=joe,dc=example,dc=com</pre>
<p>As you can see, the DN is split into components, each of which is one element of the heirarchy. Most DNs are based on an internet domain name, although it is possible to use an organization&#8217;s structure instead.</p>
<p>Each object in an LDAP database has one or more object classes. These determine what type of user it is, such as <code>posixAccount</code> for a Unix user, or <code>posixGroup</code> for a group. Users who have additional shadow password information will have the class <code>shadowAccount</code> too.</p>
<p>Each object has a list of attributes, each of which has a name and value. Typical attributes for Unix users are <code>uid</code> for the username, <code>homeDirectory</code>, <code>loginShell</code> and <code>userPassword</code>. The attributes allowed for each object differ depending on the object&#8217;s classes.</p>
<h2>LDAP Access Control</h2>
<p>When a client connects to an LDAP server, it can either authenticate itself with a DN and password, or connect anonymously. The server&#8217;s configuration determines which are allowed, and which objects and attributes a client is allowed to read or write based on this DN.</p>
<p>The popular OpenLDAP server has a special <em>root</em> DN which has read/write access to everything in the database. This DN does not even have to exist in the database, as it is defined in the server&#8217;s configuration file.</p>
<h2>Installing an LDAP Server</h2>
<p>An LDAP server is responsible for managing the data files that make up an LDAP database, and providing access to that data to clients via the network. The most popular free LDAP server is OpenLDAP (<a title="http://www.openldap.org/" rel="nofollow" href="http://www.openldap.org/">http://www.openldap.org/</a>), which is available for pretty much all Unix-like operating systems.</p>
<p>If you are running a CentOS, Fedora or Redhat Enterprise system, OpenLDAP can be installed with the command :</p>
<pre>yum install openldap openldap-servers openldap-devel openldap-clients perl-LDAP</pre>
<p>On CentOS, Fedora and Redhat Enterprise systems, the built-in LDAP server configuration will be used by default, which is not optimal for high-performance environments. To use a better configuration, run these commands :</p>
<pre>cp /etc/openldap/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
/etc/init.d/ldap start</pre>
<p>On an Ubuntu or Debian system, the command to use is :</p>
<pre>apt-get install slapd php-net-ldap</pre>
<p>On other operating systems, you will probably have to download, compile and install OpenLDAP manually. You should also install the <code>Net::LDAP</code> <acronym title="Practical Extraction and Report Language">Perl</acronym> module, which Webmin and Virtualmin need to talk to the server.</p>
<h2>Setting up Webmin&#8217;s LDAP Server Module</h2>
<p>This module allows you to configure an OpenLDAP server, manage objects in its database, and setup access control for objects. It can be found in Webmin under the <strong>Servers</strong> category. By default, it should be configured automatically to find the OpenLDAP package provided by the your Linux distribution vendor.</p>
<p>Before the LDAP server can be used to store users and groups, a few configuration steps must be performed. These can be skipped if you have already manually setup the server.</p>
<ol>
<li>Click on the <strong>OpenLDAP Server Configuration</strong> icon.</li>
<li>In the <strong>Root DN for LDAP database</strong> field, enter a base DN for your LDAP database. This is typically based on your domain name, so for a domain like <code>foo.com</code> you would enter <em>dc=foo,dc=com</em> .</li>
<li>In the <strong>Administration login DN</strong> field, enter a DN like <em>cn=Manager,dc=foo,dc=com</em> .</li>
<li>In the <strong>New administration password</strong> field, select <strong>Set to</strong> and enter a new password of your choice.</li>
<li>Click <strong>Save</strong>.</li>
<li>Open the <strong>Manage Schema</strong> page, and make sure the <code>nis</code> schema is checked.</li>
<li>If not, check it and click <strong>Save</strong>.</li>
<li>Back on the main page, click <strong>Apply Configuration</strong> or <strong>Start Server</strong>.</li>
<li>If Webmin prompts you to create the root DN you just specified, click the button to do so.</li>
</ol>
<p>Verify that the server is running and serving your base DN by clicking on the <strong>Browse Database</strong> icon. You should see the attributes of your new base object, which will have a class like <code>domain</code>.</p>
<p>Since we want the LDAP server to remain running from now on, on the module&#8217;s main page select <strong>Yes</strong> next to the <strong>Start at boot</strong> button, and click it. This will enable the <code>/etc/init.d</code> script provided by your Linux distribution.</p>
<h2>Creating LDAP Trees</h2>
<p>Now you have a root DN, you will want to create another DN under it to contain your LDAP users. This can be considered like a sub-directory, and even though you <em>could</em> create all objects under one DN, it isn&#8217;t particularly neat and will slow down database searches.</p>
<p>To create a new DN for users, do the following :</p>
<ol>
<li>Click on the <strong>Create Tree</strong> icon.</li>
<li>Select <strong>Distinguished name</strong>, and in the adjacent text field enter something like<em>dc=Users,dc=foo,dc=com</em> .</li>
<li>Change <strong>Create example object under new DN?</strong> to <strong>Unix user</strong>.</li>
<li>Click <strong>Create</strong>.</li>
</ol>
<p>If all goes well, the Users DN will be created, and an example Unix user object created under it. You can see them by navigating around on the <strong>Browse Database</strong> page.</p>
<p>You should then repeat the same steps to create a sub-tree for LDAP groups :</p>
<ol>
<li>Click on the <strong>Create Tree</strong> icon.</li>
<li>Select <strong>Distinguished name</strong>, and in the adjacent text field enter something like<em>dc=Groups,dc=foo,dc=com</em> .</li>
<li>Leave <strong>Create example object under new DN?</strong> set to <strong>No</strong>.</li>
<li>Click <strong>Create</strong>.</li>
</ol>
<h2>Storing Users in LDAP</h2>
<p>Most Unix-like operating systems (including Linux) can query an LDAP database for user and group information, which is then used by all programs and servers on the system. This means that LDAP users can login via <acronym title="Secure Shell">SSH</acronym> and <acronym title="File Transfer Protocol">FTP</acronym>, own files, run processes and do everything that a user in <code>/etc/passwd</code> can do.</p>
<h3>Introduction to NSS</h3>
<p>On Linux, NSS (Name Service Switch) is the library that determines where user and group information comes from. On a typical system only the <code>/etc/passwd</code> and <code>/etc/group</code> files were used, but because NSS is extensible it is possible to add support for any type of data source. Another that is often used is NIS, which has a similar client-server architecture to LDAP, but is losing popularity in favour of LDAP.</p>
<p>Before your system can fetch users from an LDAP database, the NSS module for it must be installed. On a CentOS, Fedora or Redhat system the command to do this is :</p>
<pre>yum install nss_ldap</pre>
<p>While on Debian or Ubuntu Linux, the command to use is :</p>
<pre>apt-get install libnss-ldap</pre>
<p>When run from the command line, this may ask several questions about the hostname of the LDAP server, the root DN and administration login. You should be able to answer them all based on the LDAP server setup done above.</p>
<h3>Introduction to PAM</h3>
<p>PAM is a set of libraries and configuration files similar to NSS, but it deals only with passwords. It was designed to make the implementation of alternate authentication types (like RSA tokens or networked user databases) easier. Because you want users in the LDAP database to be able to login, you will need to install the a PAM module for it.</p>
<p>On Debian or Ubuntu Linux, the command to install is :</p>
<pre>apt-get install libpam-ldap</pre>
<p>When run from the command line, this may ask several questions about the LDAP root DN and administration login. The answers should be the same as what you gave to the <code>libnss-ldap</code> package.</p>
<p>For reasons unknown to me, Debian and Ubuntu systems have two separate configuration files for LDAP integration, one for NSS and one for PAM &#8211; even though they really should contain the same information. To reduce your system to using just one, run the commands :</p>
<pre>mv /etc/pam_ldap.conf /etc/pam_ldap.conf.old
ln -s /etc/libnss-ldap.conf /etc/pam_ldap.conf</pre>
<p>On CentOS, Fedora or Redhat systems the needed PAM libraries are part of the <code>nss_ldap</code> package that you should have already installed in the previous step.</p>
<h3>Setting Up an LDAP Client System</h3>
<p>By now, you should have an LDAP database running with an example user in it. Your system has to be configured to actually use this database, which is best done using Webmin&#8217;s LDAP Client module (found under the <strong>System</strong> category).</p>
<p>First, your system has to be told which LDAP server to use. To do this :</p>
<ol>
<li>Click on the <strong>LDAP Server Configuration</strong> icon.</li>
<li>In the first row of the <strong>LDAP servers</strong> table, enter your system&#8217;s hostname or <code>localhost</code> in the<strong>Hostname</strong> field.</li>
<li>In the <strong>Login for root user</strong> field, enter the full administrator&#8217;s DN, like <em>cn=Manager,dc=foo,dc=com</em> .</li>
<li>In the <strong>Password for root user</strong> field, enter the password you selected when setting up the LDAP server.</li>
<li>Click <strong>Save</strong>.</li>
</ol>
<p>Next, your system needs to know where in the LDAP database to find users :</p>
<ol>
<li>Click on <strong>LDAP Search Bases</strong>.</li>
<li>In the <strong>Global search base</strong> field, enter your server&#8217;s base DN, like <em>dc=foo,dc=com</em> .</li>
<li>In <strong>Base for Unix users</strong> enter the DN for your users&#8217; sub-tree, like <em>dc=Users,dc=foo,dc=com</em> .</li>
<li>Enter the same DN in <strong>Base for Unix passwords</strong>.</li>
<li>Similarly, in <strong>Base for Unix groups</strong> enter <em>dc=Groups,dc=foo,dc=com</em> .</li>
<li>Click <strong>Save</strong>.</li>
</ol>
<p>At this point, you should be able to click on the <strong>LDAP Browser</strong> icon in this module and see the user and group sub-trees in your database. If it displays an error, check the settings made in the steps above.</p>
<p>Finally, the system has to be told to use LDAP to find user and group details. To enable this :</p>
<ol>
<li>Click on <strong>Services Using LDAP</strong>.</li>
<li>Click the <strong>Unix users</strong> entry in the table. On the page that appears, next to <strong>Second data source</strong>select <em>LDAP</em>, then hit <strong>Save</strong>.</li>
<li>Do the same for <strong>Unix groups</strong> and <strong>Unix shadow passwords</strong>.</li>
</ol>
<p>To verify that everything is really working, click the <strong>Validate Configuration</strong> button on the main page of the <strong>LDAP Client</strong> module. It should find and display the <code>example</code> Unix user that was created when you setup your LDAP server. If not, use the error message to work out what might have gone wrong.</p>
<p>If you get an error like <em>user does not exist</em> even when you are sure everything is correct, try restarting Webmin with the <code>/etc/webmin/restart</code> command run as root at the command line. On some systems, user and group data sources are cached by running server processes until they are restarted.</p>
<p>These same steps can be repeated on any other system on your network that should share users and groups. Naturally, they will also need to NSS and PAM LDAP modules installed too. These other systems should share the base directory for users&#8217; homes (typically <code>/home</code>) via NFS, so that users can login to any LDAP client and access their files.</p>
<p>On some systems (notably Debian and Ubuntu), the <tt>www-data</tt> user Apache runs as cannot be a member of any domains&#8217; groups, which prevents websites from working in a default Virtualmin setup. To fix this, edit the <tt>/etc/ldap.conf</tt> file, find the <tt>nss_initgroups_ignoreusers</tt> line and remove <tt>www-data</tt> from it.</p>
<p>NFS can be setup by using the <strong>NFS Exports</strong> module to share <code>/home</code> to the other client systems, and the<strong>Disk and Network Filesystems</strong> module on clients to add an NFS filesystem that mounts it. Typically one system will be both the LDAP and NFS server, but that doesn&#8217;t strictly have to be case, as long as they can all write to <code>/home</code>.</p>
<h3>Setting up PAM</h3>
<p>PAM has it&#8217;s own configuration files that determine when LDAP is used to check and change passwords. Unless they are setup, users created in LDAP will exist but will not be able to login. A command like <code>id -a example</code> will display a user from LDAP, but you will not be able to change his password with a command like <code>passwd example</code>.</p>
<p>This can be setup in Webmin&#8217;s <strong>PAM Authentication</strong> module, found under the <strong>System Category</strong>. The exact steps to take differ slightly between Redhat-based and Debian-based distributions though. Once they are done, you should be able to use the <code>passwd</code> command to set a password for the <code>example</code> user.</p>
<h4>PAM Setup On Debian and Ubuntu</h4>
<p>Debian-based systems have a separate PAM include file for each step. LDAP support needs to be added to each as follows :</p>
<ol>
<li>Click on <strong>common-account</strong> in the list of services.</li>
<li>Select <code>pam_ldap.so</code> from the <strong>Add step for</strong> menu, then click the button.</li>
<li>Change the <strong>Failure level</strong> to <strong>Sufficient</strong>, then click <strong>Create</strong>.</li>
<li>Use the up arrow to move the new <code>pam_ldap.so</code> step above the existing <code>pam_unix.so</code> entry.</li>
</ol>
<p>These same steps should then be repeated for the <strong>common-auth</strong>, <strong>common-password</strong> and <strong>common-session</strong> services.</p>
<h4>PAM Setup on CentOS, Fedora and Redhat</h4>
<p>Redhat-based systems have a single common PAM service that is called by all others. LDAP support can be added to it as follows :</p>
<ol>
<li>Click on <strong>system-auth</strong> in the list of services.</li>
<li>In the <strong>Authentication steps</strong> section, select <code>pam_ldap.so</code> from the <strong>Add step for</strong> menu, then click the button.</li>
<li>Change the <strong>Failure level</strong> to <strong>Sufficient</strong>, then click <strong>Create</strong>.</li>
<li>Use the up arrow to move the new <code>pam_ldap.so</code> step above the existing <code>pam_unix.so</code> entry.</li>
<li>Repeat 1,2 and 3 in the <strong>Account verification</strong>, <strong>Session setup</strong> and <strong>Password change</strong> steps on the same page.</li>
</ol>
<h3>Setting Up Webmin&#8217;s LDAP Users and Groups Module</h3>
<p>Even though you could theoretically add a user to an LDAP database using the LDAP Server module&#8217;s browser, it is much easier to use a Webmin module that takes care of selecting all the correct attributes for you. The <strong>LDAP Users and Groups</strong> module under the <strong>System</strong> category is similar to the more commonly used <strong>Users and Groups</strong> module, but operates directly on a local or remote LDAP database.</p>
<p>Assuming that your system has been setup as an LDAP client, when you open the module it should display a list of existing users and groups, including the <code>example</code> user. If it displays an error about connecting to the database or searching for users, you may need to adjust settings on the <strong>Module Config</strong> page.</p>
<p>To ensure that user creation is working, try clicking on <strong>Add a new LDAP user</strong>, filling in the <strong>Username</strong>,<strong>Real name</strong> and <strong>Password</strong>, and clicking <strong>Create</strong>. If the user is added to the list with no errors, and if you can <acronym title="Secure Shell">SSH</acronym> into the system as the user, congratulations!</p>
<p>If you get an error like <code>no strucutural object class provided</code> when adding a user, the cause is almost certainly that your LDAP schema requires that users have the <code>person</code> object class. Webmin versions 1.404 and later add this automatically, but to have it added in older versions you should do the following :</p>
<ol>
<li>Click on the <strong>Module Config</strong> link, and enter <em>person</em> in the <strong>Other objectClasses to add to new users</strong> field.</li>
<li>Go to the <strong>LDAP attributes</strong> section, and in the <strong>LDAP properties for all new users</strong> box enter</li>
</ol>
<pre>sn: ${REAL}</pre>
<ol>
<li>Click <strong>Save</strong>.</li>
<li>Re-try creating a user.</li>
</ol>
<h3>Creating LDAP Users with Virtualmin</h3>
<p>Once the <strong>LDAP Users and Groups</strong> module is working, you can configure Virtualmin to add new domain users and mailboxes to LDAP instead of files in <code>/etc</code>. This can be done as follows :</p>
<ol>
<li>Open the <strong>System Settings</strong> category on Virtualmin&#8217;s left menu, and click on <strong>Module Config</strong>.</li>
<li>Change <strong>Store users and groups</strong> to <strong>LDAP database</strong>, and click <strong>Save</strong>.</li>
<li>If prompted, click the button to re-check the Virtualmin configuration.</li>
<li>Go to Webmin&#8217;s <strong>Bootup and Shutdown</strong> module under the <strong>System</strong> category, and look for an <code>nscd</code>action. If you see it, check the box next to it and then click <strong>Disable Now and On Boot</strong>. The Name Service Caching Daemon causes problems for Virtualmin, as it adds delay between when a user is added to the database and when it becomes visible to other programs.</li>
</ol>
<p>Any domains or mailboxes created from now on will be added to LDAP. To avoid confusion, I suggest only making this change on a system that isn&#8217;t hosting any domains yet, so that they are all added to the same database.</p>
<p>The most common error is something like <code>failed to create administration user</code> or <code>administration user was created but does not exist</code>. This means that Virtualmin added an LDAP entry successfully, but when it used the <code>getpwnam</code> system call to check if the user is really known to Unix, he was not found. The most common cause is an incorrect LDAP client configuration, which should be revealed by the <strong>Validation Configuration</strong> button in the <strong>LDAP Client</strong> module. Another common cause is the <code>nscd</code> daemon, which adds a delay before users are visible and should be disabled.</p>
<h2>Storing Email Aliases in LDAP</h2>
<p>Just as users and groups can be stored in LDAP, so can email aliases used by mail servers like Postfix. These can then be read by multiple mail servers sharing the same configuration, to distribute the mail delivery load.</p>
<p>These instructions assume that you already have a working LDAP server as explained above, but don&#8217;t require that the system be setup to use LDAP for users or groups. Also, only Postfix is covered (even though Sendmail has similar capabilities), as only the Postfix Webmin module supports LDAP at the time of writing.</p>
<h3>Postfix&#8217;s LDAP Suppport</h3>
<p>Postfix stores aliases, virtual address mappings and other configuration tables in <strong>maps</strong>, which are typically DBM format files built from text files. However, with the right plugin modules it can use a MySQL or LDAP database instead, which can be queried over the network.</p>
<p>On Debian or Ubuntu systems, the command to install LDAP support for Postfix is :</p>
<pre>apt-get install postfix-ldap</pre>
<p>On other systems, Postfix may come with LDAP support already enabled. If not, you may need to download and compile it manually. To check if your Postfix supports LDAP, run the command :</p>
<pre>postconf -m</pre>
<p>and look for ldap in the output.</p>
<h3>Setting up the LDAP Schema</h3>
<p>I&#8217;ve found that there doesn&#8217;t seem to be any consistent agreement on which LDAP object class and attributes to use for Postfix objects. However, the <code>misc</code> schema that comes with OpenLDAP defines a<code>inetLocalMailRecipient</code> class that is almost good enough.</p>
<p>To configure the schema fully, do the following :</p>
<ol>
<li>Go to the <strong>LDAP Server</strong> module, and click on <strong>Manage Schema</strong>.</li>
<li>Check the box next to the <code>misc</code> schema (if it isn&#8217;t already), and click <strong>Save</strong>.</li>
<li>Go back to the schema page, and click the <strong>Edit</strong> link next to the <code>misc</code> schema.</li>
<li>Find the definition for the <code>inetLocalMailRecipient</code> class, which should be like :
<pre>objectclass ( 2.16.840.1.113730.3.2.147
	NAME 'inetLocalMailRecipient'
	DESC 'Internet local mail recipient'
	SUP top AUXILIARY
	MAY	( mailLocalAddress $ mailHost $ mailRoutingAddress ) )</pre>
</li>
<li>Change the <code>AUXILIARY</code> to <code>STRUCTURAL</code>, and click <strong>Save</strong>.</li>
<li>Go back to the module&#8217;s main page, and click <strong>Apply Configuration</strong>.</li>
</ol>
<h3>Creating LDAP Trees for Postfix</h3>
<p>Each Postfix map should have a separate sub-tree in the LDAP database. With Virtualmin, you will need at least trees for the <code>alias</code> and <code>virtual</code> maps, which can be created as follows :</p>
<ol>
<li>Click on <strong>Create Tree</strong>.</li>
<li>Select <strong>Distinguished name</strong>, and in the adjacent field enter something like<em>dc=Aliases,dc=foo,dc=com</em>.</li>
<li>Click <strong>Create</strong>.</li>
<li>Repeat these steps to create the <em>dc=Virtual,dc=foo,dc=com</em> tree.</li>
</ol>
<h3>Configuring the Webmin Postfix Module</h3>
<p>Now that the LDAP server is set, Postfix has to be told to talk to it. The first step is to have it use the correct LDAP object class, by doing :</p>
<ol>
<li>Go to the <strong>Postfix Mail Server</strong> module, and click on <strong>Module Config</strong>.</li>
<li>Find the <strong>LDAP options</strong> section.</li>
<li>Change the <strong>Object classes for maps</strong> to <em>inetLocalMailRecipient</em> .</li>
<li>Change the <strong>Key attribute for map objects</strong> to <em>mailLocalAddress</em> .</li>
<li>For <strong>Create separate DN for each domain?</strong>, select <strong>No</strong> .</li>
<li>Click <strong>Save</strong>.</li>
</ol>
<p>Now you need to edit the maps for aliases and virtual domains to add LDAP data sources, as follows :</p>
<ol>
<li>Go to the <strong>Postfix Mail Server</strong> module, and click on <strong>Mail Aliases</strong>.</li>
<li>Click the <strong>&#8230;</strong> button next to <strong>Alias databases used by the local delivery agent</strong>. By default, this field will just contain something like <code>hash:/etc/aliases</code>.</li>
<li>In the popup window, scroll down to the <strong>Map source 2</strong> section and select <strong>LDAP server</strong>.</li>
<li>Enter your LDAP server&#8217;s hostname in the <strong>LDAP server hosts</strong> field.</li>
<li>Set the <strong>LDAP search base DN</strong> to the DN you created previously, such as<em>dc=Aliases,dc=foo,dc=com</em> .</li>
<li>Set the <strong>Query filter</strong> to <em>mailLocalAddress=%s</em> .</li>
<li>Set the <strong>Result attribute</strong> to <em>mailRoutingAddress</em> .</li>
<li>In the <strong>Server login</strong> field, enter your LDAP server&#8217;s administration login, like<em>cn=Manager,dc=foo,dc=com</em> .</li>
<li>Enter the LDAP administration password in the <strong>Server password</strong> field.</li>
<li>Click <strong>Save</strong> at the bottom of the popup window.</li>
<li>Click <strong>Save</strong> again back on the <strong>Mail Aliases</strong> page.</li>
</ol>
<p>It is also possible to use a different login, such as an LDAP account who just has read-write access to the aliases sub-tree.</p>
<p>You must now do the same thing on the <strong>Virtual Domains</strong> page. The only difference should be in the <strong>LDAP search base DN</strong> field, which should be set to something like <em>dc=Virtual,dc=foo,dc=com</em> .</p>
<p>To verify that everything is working, try adding an alias using Webmin and ensure that it shows up in the list of aliases. Then send email to the new alias, and check that it is forwarded correctly. If not, check the Postfix logs in <code>/var/log/mail*</code> for errors that explain why it couldn&#8217;t talk to the LDAP database.</p>
<h3>Creating LDAP Aliases with Virtualmin</h3>
<p>Once Webmin&#8217;s Postfix module is configured to use LDAP, Virtualmin should automatically detect this and create any new aliases in the same LDAP database. To verify that it is all working, click on <strong>Re-Check Config</strong> on the left menu, and look for any messages about problems talking to the database server.</p>
<p>If that all checks out OK, try adding a mail aliases in Virtualmin, sending email to it, and verifying that it is delivered OK. Do the same for a mailbox user, as each has at least one <code>virtual</code> map entry for his address.</p>
<p>If you plan to run more than one mail server, each must have the same LDAP map configuration. This can be simplified by just copying across the configuration files in <code>/etc/postfix</code> that you will see referenced in the map definitions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2626/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2626&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/16/ldap-with-webmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu Linux OpenSSH Server installation and configuration</title>
		<link>http://mnlinux.wordpress.com/2010/01/15/ubuntu-linux-openssh-server-installation-and-configuration/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/15/ubuntu-linux-openssh-server-installation-and-configuration/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:43:04 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2622</guid>
		<description><![CDATA[Q. I have just installed Ubuntu 6.06 and I would like to allow remote login to my system from home via ssh. How do I install and configure SSH server? A. OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2622&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Q. I have just installed Ubuntu 6.06 and I would like to allow remote login to my system from home via ssh. How do I install and configure SSH server?</p>
<p>A. OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.</p>
<h2>Ubuntu SSHD Installation</h2>
<p>Type the following two command to install both ssh client and server:<br />
<code># sudo apt-get install openssh-server openssh-client</code></p>
<h2>SSHD Configuration</h2>
<p>To be frank your server is ready by default. Just test it from your home computer or from same system with the command:<br />
<code># ssh localhost</code><br />
OR<br />
<code># ssh user@your-server-ip-address</code></p>
<h2>How do I use ssh client?</h2>
<p>Assuming that your server hostname is userver.mydomain.com and username is vivek, you need to type the following command:<br />
<code># ssh vivek@userver.mydomain.com</code><br />
To stop ssh server, enter:<br />
<code># sudo /etc/init.d/ssh stop</code><br />
To start sshs server, enter:<br />
<code># sudo /etc/init.d/ssh start</code><br />
To restart ssh server, enter:<br />
<code># sudo /etc/init.d/ssh restart</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2622/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2622&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/15/ubuntu-linux-openssh-server-installation-and-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>DovecotLDAP</title>
		<link>http://mnlinux.wordpress.com/2010/01/15/dovecotldap/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/15/dovecotldap/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:32:56 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[Mail]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2620</guid>
		<description><![CDATA[Introduction This guide will help you configure the Dovecot IMAP/POP3 server program to use LDAP for user authentication. Prerequisites It&#8217;s probably a good idea to install and configure Dovecot first without using LDAP that way you&#8217;ll be sure to have a working installation to go back to. To install and configure Dovecot to use the Linux [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2620&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>This guide will help you configure the <a href="/community/Dovecot">Dovecot</a> IMAP/POP3 server program to use LDAP for user authentication.</p>
<h1>Prerequisites</h1>
<p>It&#8217;s probably a good idea to install and configure Dovecot first without using LDAP that way you&#8217;ll be sure to have a working installation to go back to. To install and configure Dovecot to use the Linux system users follow the <a href="/community/Dovecot">Dovecot</a> guide.</p>
<p>The next thing you&#8217;ll need is a working LDAP server. This guide is written using OpenLDAP, but Dovecot can be configured to use other LDAP servers. For instructions on installing and configuring OpenLDAP see the <a href="/community/OpenLDAPServer">OpenLDAPServer</a> page.</p>
<h1>Configuration</h1>
<h2>/etc/dovecot/dovecot-ldap.conf</h2>
<p>To configure Dovecot to use LDAP first edit <strong>/etc/dovecot/dovecot-ldap.conf</strong> this file contains details about your LDAP server.</p>
<p>The first setting you&#8217;ll need to set is <strong>host</strong> this is the hostname or IP Address of the machine running your LDAP server:</p>
<pre>host = ldap.example.org</pre>
<p>The next setting needed is <strong>dn</strong> and <strong>dnpass</strong> this is the DN of the user used to connect to and search through the LDAP directory.</p>
<pre>dn = cn=Manager,dc=example,dc=org
dnpass = secret</pre>
<p>If you&#8217;ve configured you&#8217;re LDAP server to use TLS set the <strong>tls</strong> setting to yes:</p>
<pre>tls = yes</pre>
<p>This will encrypt traffic between Dovecot and your LDAP server. This option is highly recommended if your Dovecot server is on a different machine than your LDAP server.</p>
<ul>
<li><strong>Note</strong>: This option is not available with the version of Dovecot shipped with Ubuntu 6.06 (Dapper), Ubuntu 6.10 (Edgy), or Ubuntu 7.04 (Feisty).</li>
</ul>
<p>To verify the user&#8217;s password set the <strong>auth_bind</strong> setting. Dovecot will bind to the LDAP directory using the mail client user&#8217;s credentials.</p>
<pre>auth_bind = yes</pre>
<p>If your users are set up under one area in your LDAP directory set the <strong>auth_bind_userdn</strong> setting. This will save a LDAP request per login, but isn&#8217;t strictly necessary.</p>
<pre>auth_bind_userdn = cn=%u,ou=People,dc=example,dc=org</pre>
<p>In this example all user objects are under the People OU in the directory.</p>
<p>Depending on how you&#8217;ve configured your LDAP server you&#8217;ll need to set the <strong>ldap_version</strong> setting appropriately:</p>
<pre>ldap_version = 3</pre>
<p>LDAP version 3 is the latest version of the protocol, but depending on if you have legacy applications you may be using LDAP version 2 as well.</p>
<p>Next set the LDAP search base. This setting configures where to start searching through your LDAP directory. This could be the same as the <em>auth_bind</em> setting. Also related to searching the directory is the <strong>scope</strong> setting. Set this if you want to search through sub objects of your directory. For example if you have an OU named Executives inside the People OU you&#8217;d set scope setting to<em>subtree</em></p>
<pre>base = ou=People, dc=example, dc=org
scope = subtree</pre>
<p>You need to tell Dovecot wich LDAP attributes map to Dovecot settings uid, gid, home, and mail. This is done with the <strong>user_attrs</strong>setting:</p>
<pre>user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid</pre>
<p>The <strong>user_filter</strong> setting will be used when Dovecot searches LDAP for user accounts:</p>
<pre>user_filter = (&amp;(objectClass=posixAccount)(uid=%u))</pre>
<p>The <strong>%u</strong> will be replaced by the user&#8217;s username entered into their mail client.</p>
<p>Dovecot also needs to know which LDAP attributes are associated with the user&#8217;s password. Similar to the <em>user_attrs</em> setting this is done with the <strong>pass_attrs</strong> setting:</p>
<pre>pass_attrs = uid=user,userPassword=password</pre>
<p>Like the <em>user_filter</em> you need to set the <strong>pass_filter</strong> setting:</p>
<pre>pass_filter = (&amp;(objectClass=posixAccount)(uid=%u))</pre>
<p>Just as with the user_filter the <em>%u</em> is replaced with the username.</p>
<h2>/etc/dovecot/dovecot.conf</h2>
<p>Now that Dovecot knows the details of your LDAP server you need to configure Dovecot to use it. This is done by editing the<strong>/etc/dovecot/dovecot.conf</strong> file.</p>
<p>The first setting to change is under the <em>auth_default</em> section <strong>passwd ldap</strong>:</p>
<pre>  # LDAP database
  passdb ldap {
  # Path for LDAP configuration file, see doc/dovecot-ldap.conf for example
    args = /etc/dovecot/dovecot-ldap.conf
  }</pre>
<p>This setting tells Dovecot to use LDAP to lookup passwords.</p>
<p>Next the <strong>user ldap</strong> setting, which tells Dovecot to use LDAP to find users, needs to be configured:</p>
<pre>  # LDAP database
  userdb ldap {
    # Path for LDAP configuration file, see doc/dovecot-ldap.conf for example
    args = /etc/dovecot/dovecot-ldap.conf
  }</pre>
<h1>Testing</h1>
<p>Now that Dovecot is configured to use LDAP it&#8217;ll need to be restarted to use the new settings:</p>
<pre>/etc/init.d/dovecot restart</pre>
<p>To test that Dovecot is indeed using LDAP for user authentication simply configure a mail client to connect to the server using either IMAP or POP3 (whichever you&#8217;ve configured Dovecot to serve). If all goes well you should be able to login and get email.</p>
<p>Another way to test is to start <strong>slapd</strong> in a console session with debug output:</p>
<pre>/etc/init.d/slapd stop (this will stop slapd in case it's already running)
slapd -f /etc/ldap/slapd.conf -d -1</pre>
<p>Whenever a user connects to Dovecot you should see the LDAP debug output in the console window.</p>
<ul>
<li>This is also a great way to make sure you&#8217;ve configured Dovecot to use LDAP correctly.</li>
</ul>
<p><strong>Note</strong>: This guide has been tested on Ubuntu 6.06 (Dapper), Ubuntu 7.04 (Feitsy), and Ubuntu (Gutsy).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2620/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2620&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/15/dovecotldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>SSH server</title>
		<link>http://mnlinux.wordpress.com/2010/01/15/ssh-server/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/15/ssh-server/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:26:45 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2617</guid>
		<description><![CDATA[Introduction This section of the Ubuntu Server Guide introduces a powerful collection of tools for the remote control of networked computers and transfer of data between networked computers, called OpenSSH. You will also learn about some of the configuration settings possible with the OpenSSH server application and how to change them on your Ubuntu system. OpenSSH [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2617&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>This section of the Ubuntu Server Guide introduces a powerful collection of tools for the remote control of networked computers and transfer of data between networked computers, called <em>OpenSSH</em>. You will also learn about some of the configuration settings possible with the OpenSSH server application and how to change them on your Ubuntu system.</p>
<p>OpenSSH is a freely available version of the Secure Shell (SSH) protocol family of tools for remotely controlling a computer or transferring files between computers. Traditional tools used to accomplish these functions, such as <strong>telnet</strong> or<strong>rcp</strong>, are insecure and transmit the user&#8217;s password in cleartext when used. OpenSSH provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations, effectively replacing the legacy tools.</p>
<p>The OpenSSH server component, <strong>sshd</strong>, listens continuously for client connections from any of the client tools. When a connection request occurs, <strong>sshd</strong> sets up the correct connection depending on the type of client tool connecting. For example, if the remote computer is connecting with the <strong>ssh</strong> client application, the OpenSSH server sets up a remote control session after authentication. If a remote user connects to an OpenSSH server with <strong>scp</strong>, the OpenSSH server daemon initiates a secure copy of files between the server and client after authentication. OpenSSH can use many authentication methods, including plain password, public key, and <strong>Kerberos</strong> tickets.</p>
<h3>Installation</h3>
<p>Installation of the OpenSSH client and server applications is simple. To install the OpenSSH client applications on your Ubuntu system, use this command at a terminal prompt:</p>
<pre><strong>sudo apt-get install openssh-client</strong></pre>
<p>To install the OpenSSH server application, and related support files, use this command at a terminal prompt:</p>
<pre><strong>sudo apt-get install openssh-server</strong></pre>
<p>The <strong>openssh-server</strong> package can also be selected to install during the Server Edition installation process.</p>
<h3>Configuration</h3>
<p>You may configure the default behavior of the OpenSSH server application, <strong>sshd</strong>, by editing the file<code>/etc/ssh/sshd_config</code>. For information about the configuration directives used in this file, you may view the appropriate manual page with the following command, issued at a terminal prompt:</p>
<pre><strong>man sshd_config</strong></pre>
<p>There are many directives in the <strong>sshd</strong> configuration file controlling such things as communication settings and authentication modes. The following are examples of configuration directives that can be changed by editing the<code>/etc/ssh/sshd_config</code> file.</p>
<table border="0" summary="Tip">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference and to reuse as necessary.</p>
<p>Copy the <code>/etc/ssh/sshd_config</code> file and protect it from writing with the following commands, issued at a terminal prompt:</td>
</tr>
</tbody>
</table>
<pre><strong>sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original</strong>
<strong>sudo chmod a-w /etc/ssh/sshd_config.original</strong></pre>
<p>The following are examples of configuration directives you may change:</p>
<ul>
<li>To set your OpenSSH to listen on TCP port 2222 instead of the default TCP port 22, change the Port directive as such:
<p>Port 2222</li>
<li>To have <strong>sshd</strong> allow public key-based login credentials, simply add or modify the line:
<p>PubkeyAuthentication yes</p>
<p>In the <code>/etc/ssh/sshd_config</code> file, or if already present, ensure the line is not commented out.</li>
<li>To make your OpenSSH server display the contents of the <code>/etc/issue.net</code> file as a pre-login banner, simply add or modify the line:
<p>Banner /etc/issue.net</p>
<p>In the <code>/etc/ssh/sshd_config</code> file.</li>
</ul>
<p>After making changes to the <code>/etc/ssh/sshd_config</code> file, save the file, and restart the <strong>sshd</strong> server application to effect the changes using the following command at a terminal prompt:</p>
<pre><strong>sudo /etc/init.d/ssh restart</strong></pre>
<table border="0" summary="Warning">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Many other configuration directives for <strong>sshd</strong> are available for changing the server application&#8217;s behavior to fit your needs. Be advised, however, if your only method of access to a server is <strong>ssh</strong>, and you make a mistake in configuring <strong>sshd</strong> via the <code>/etc/ssh/sshd_config</code> file, you may find you are locked out of the server upon restarting it, or that the <strong>sshd</strong> server refuses to start due to an incorrect configuration directive, so be extra careful when editing this file on a remote server.</td>
</tr>
</tbody>
</table>
<h3>SSH Keys</h3>
<p>SSH <em>keys</em> allow authentication between two hosts without the need of a password. SSH key authentication uses two keys a <em>private</em> key and a <em>public</em> key.</p>
<p>To generate the keys, from a terminal prompt enter:</p>
<pre><strong>ssh-keygen -t dsa</strong></pre>
<p>This will generate the keys using a <em>DSA</em> authentication identity of the user. During the process you will be prompted for a password. Simply hit <em>Enter</em> when prompted to create the key.</p>
<p>By default the <em>public</em> key is saved in the file <code>~/.ssh/id_dsa.pub</code>, while <code>~/.ssh/id_dsa</code> is the <em>private</em> key. Now copy the<code>id_dsa.pub</code> file to the remote host and append it to <code>~/.ssh/authorized_keys</code> by entering:</p>
<pre><strong>ssh-copy-id username@remotehost</strong></pre>
<p>Finally, double check the permissions on the <code>authorized_keys</code> file, only the authenticated user should have read and write permissions. If the permissions are not correct change them by:</p>
<pre><strong>chmod 644 .ssh/authorized_keys</strong></pre>
<p>You should now be able to SSH to the host without being prompted for a password.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2617/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2617/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2617/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2617/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2617/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2617/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2617/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2617/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2617&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/15/ssh-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>FTP server</title>
		<link>http://mnlinux.wordpress.com/2010/01/15/ftp-server/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/15/ftp-server/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:18:50 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/2010/01/15/ftp-server/</guid>
		<description><![CDATA[File Transfer Protocol (FTP) is a TCP protocol for uploading and downloading files between computers. FTP works on a client/server model. The server component is called an FTP daemon. It continuously listens for FTP requests from remote clients. When a request is received, it manages the login and sets up the connection. For the duration of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2616&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>File Transfer Protocol (FTP) is a TCP protocol for uploading and downloading files between computers. FTP works on a client/server model. The server component is called an <em>FTP daemon</em>. It continuously listens for FTP requests from remote clients. When a request is received, it manages the login and sets up the connection. For the duration of the session it executes any of commands sent by the FTP client.</p>
<p>Access to an FTP server can be managed in two ways:</p>
<ul>
<li>Anonymous</li>
<li>Authenticated</li>
</ul>
<p>In the Anonymous mode, remote clients can access the FTP server by using the default user account called &#8220;anonymous&#8221; or &#8220;ftp&#8221; and sending an email address as the password. In the Authenticated mode a user must have an account and a password. User access to the FTP server directories and files is dependent on the permissions defined for the account used at login. As a general rule, the FTP daemon will hide the root directory of the FTP server and change it to the FTP Home directory. This hides the rest of the file system from remote sessions.</p>
<h3>vsftpd &#8211; FTP Server Installation</h3>
<p>vsftpd is an FTP daemon available in Ubuntu. It is easy to install, set up, and maintain. To install <strong>vsftpd</strong> you can run the following command:</p>
<pre><strong>sudo apt-get install vsftpd</strong></pre>
<h3>Anonymous FTP Configuration</h3>
<p>By default <strong>vsftpd</strong> is configured to only allow anonymous download. During installation a <em>ftp</em> user is created with a home directory of <code>/home/ftp</code>. This is the default FTP directory.</p>
<p>If you wish to change this location, to <code>/srv/ftp</code> for example, simply create a directory in another location and change the<em>ftp</em> user&#8217;s home directory:</p>
<pre><strong>sudo mkdir /srv/ftp</strong>
<strong>sudo usermod -d /srv/ftp ftp</strong></pre>
<p>After making the change restart <strong>vsftpd</strong>:</p>
<pre><strong>sudo /etc/init.d/vsftpd restart</strong></pre>
<p>Finally, copy any files and directories you would like to make available through anonymous FTP to <code>/srv/ftp</code>.</p>
<h3>User Authenticated FTP Configuration</h3>
<p>To configure <strong>vsftpd</strong> to authenticate system users and allow them to upload files edit <code>/etc/vsftpd.conf</code>:</p>
<pre>local_enable=YES
write_enable=YES</pre>
<p>Now restart <strong>vsftpd</strong>:</p>
<pre><strong>sudo /etc/init.d/vsftpd restart</strong></pre>
<p>Now when system users login to FTP they will start in their <em>home</em> directories where they can download, upload, create directories, etc.</p>
<p>Similarly, by default, the anonymous users are not allowed to upload files to FTP server. To change this setting, you should uncomment the following line, and restart <strong>vsftpd</strong>:</p>
<pre>anon_upload_enable=YES</pre>
<table border="0" summary="Warning">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Enabling anonymous FTP upload can be an extreme security risk. It is best to not enable anonymous upload on servers accessed directly from the Internet.</td>
</tr>
</tbody>
</table>
<p>The configuration file consists of many configuration parameters. The information about each parameter is available in the configuration file. Alternatively, you can refer to the man page, <strong>man 5 vsftpd.conf</strong> for details of each parameter.</p>
<h3>Securing FTP</h3>
<p>There are options in <code>/etc/vsftpd.conf</code> to help make <strong>vsftpd</strong> more secure. For example users can be limited to their home directories by uncommenting:</p>
<pre>chroot_local_user=YES</pre>
<p>You can also limit a specific list of users to just their home directories:</p>
<pre>chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list</pre>
<p>After uncommenting the above options, create a <code>/etc/vsftpd.chroot_list</code> containing a list of users one per line. Then restart <strong>vsftpd</strong>:</p>
<pre><strong>sudo /etc/init.d/vsftpd restart</strong></pre>
<p>Also, the <code>/etc/ftpusers</code> file is a list of users that are <em>disallowed</em> FTP access. The default list includes root, daemon, nobody, etc. To disable FTP access for additional users simply add them to the list.</p>
<p>FTP can also be encrypted using <em>FTPS</em>. Different from <em>SFTP</em>, <em>FTPS</em> is FTP over Secure Socket Layer (SSL). <em>SFTP</em> is a FTP like session over an encrypted <em>SSH</em> connection. A major difference is that users of SFTP need to have a <em>shell</em>account on the system, instead of a <em>nologin</em> shell. Providing all users with a shell may not be ideal for some environments, such as a shared web host.</p>
<p>To configure <em>FTPS</em>, edit <code>/etc/vsftpd.conf</code> and at the bottom add:</p>
<pre>ssl_enable=Yes</pre>
<p>Also, notice the certificate and key related options:</p>
<pre>rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key</pre>
<p>By default these options are set the certificate and key provided by the <strong>ssl-cert</strong> package. In a production environment these should be replaced with a certificate and key generated for the specific host. For more information on certificates see <a title="Certificates" href="certificates-and-security.html">the section called “Certificates”</a>.</p>
<p>Now restart <strong>vsftpd</strong>, and non-anonymous users will be forced to use <em>FTPS</em>:</p>
<pre><strong>sudo /etc/init.d/vsftpd restart</strong></pre>
<p>To allow users with a shell of <code>/usr/sbin/nologin</code> access to FTP, but have no shell access, edit <code>/etc/shells</code> adding the<em>nologin</em> shell:</p>
<pre># /etc/shells: valid login shells
/bin/csh
/bin/sh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
/usr/sbin/nologin</pre>
<p>This is necessary because, by default <strong>vsftpd</strong> uses PAM for authentication, and the <code>/etc/pam.d/vsftpd</code> configuration file contains:</p>
<pre>auth    required        pam_shells.so</pre>
<p>The <em>shells</em> PAM module restricts access to shells listed in the <code>/etc/shells</code> file.</p>
<p>Most popular FTP clients can be configured connect using FTPS. The <strong>lftp</strong> command line FTP client has the ability to use FTPS as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2616/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2616&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/15/ftp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
		<item>
		<title>Postfix</title>
		<link>http://mnlinux.wordpress.com/2010/01/15/postfix/</link>
		<comments>http://mnlinux.wordpress.com/2010/01/15/postfix/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:16:01 +0000</pubDate>
		<dc:creator>aquaballoon</dc:creator>
				<category><![CDATA[Mail]]></category>

		<guid isPermaLink="false">http://mnlinux.wordpress.com/?p=2613</guid>
		<description><![CDATA[Postfix is the default Mail Transfer Agent (MTA) in Ubuntu. It attempts to be fast and easy to administer and secure. It is compatible with the MTA sendmail. This section explains how to install and configure postfix. It also explains how to set it up as an SMTP server using a secure connection (for sending emails securely). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2613&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Postfix</strong> is the default Mail Transfer Agent (MTA) in Ubuntu. It attempts to be fast and easy to administer and secure. It is compatible with the MTA <strong>sendmail</strong>. This section explains how to install and configure <strong>postfix</strong>. It also explains how to set it up as an SMTP server using a secure connection (for sending emails securely).</p>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">This guide does not cover setting up Postfix <em>Virtual Domains</em>, for information on Virtual Domains and other advanced configurations see <a title="References" href="postfix.html#postfix-references">the section called “References”</a>.</td>
</tr>
</tbody>
</table>
<h3>Installation</h3>
<p>To install <strong>postfix</strong> run the following command:</p>
<pre><strong>sudo apt-get install postfix</strong></pre>
<p>Simply press return when the installation process asks questions, the configuration will be done in greater detail in the next stage.</p>
<h3>Basic Configuration</h3>
<p>To configure <strong>postfix</strong>, run the following command:</p>
<pre><strong>sudo dpkg-reconfigure postfix</strong></pre>
<p>The user interface will be displayed. On each screen, select the following values:</p>
<ul>
<li>Internet Site</li>
<li>mail.example.com</li>
<li>steve</li>
<li>mail.example.com, localhost.localdomain, localhost</li>
<li>No</li>
<li>127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0/24</li>
<li>0</li>
<li>+</li>
<li>all</li>
</ul>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Replace mail.example.com with the domain for which you&#8217;ll accept email, 192.168.0/24 with the actual network and class range of your mail server, and steve with the appropriate username.</td>
</tr>
</tbody>
</table>
<p>Now is a good time to decide which mailbox format you want to use. By default Postfix will use <strong>mbox</strong> for the mailbox format. Rather than editing the configuration file directly, you can use the <strong>postconf</strong> command to configure all <strong>postfix</strong>parameters. The configuration parameters will be stored in <code>/etc/postfix/main.cf</code> file. Later if you wish to re-configure a particular parameter, you can either run the command or change it manually in the file.</p>
<p>To configure the mailbox format for <strong>Maildir:</strong></p>
<pre><strong>sudo postconf -e 'home_mailbox = Maildir/'</strong></pre>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">This will place new mail in /home/username/Maildir so you will need to configure your Mail Delivery Agent (MDA) to use the same path.</td>
</tr>
</tbody>
</table>
<h3>SMTP Authentication</h3>
<p>SMTP-AUTH allows a client to identify itself through an authentication mechanism (SASL). Transport Layer Security (TLS) should be used to encrypt the authentication process. Once authenticated the SMTP server will allow the client to relay mail.</p>
<ol>
<li>Configure Postfix for SMTP-AUTH using SASL (Dovecot SASL):
<pre>sudo postconf -e 'smtpd_sasl_type = dovecot'
sudo postconf -e 'smtpd_sasl_path = private/auth-client'
sudo postconf -e 'smtpd_sasl_local_domain ='
sudo postconf -e 'smtpd_sasl_security_options = noanonymous'
sudo postconf -e 'broken_sasl_auth_clients = yes'
sudo postconf -e 'smtpd_sasl_auth_enable = yes'
sudo postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
sudo postconf -e 'inet_interfaces = all'</pre>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">The <em>smtpd_sasl_path</em> configuration is a path relative to the Postfix queue directory.</td>
</tr>
</tbody>
</table>
</li>
<li>Next, obtain a digital certificate for TLS. See <a title="Certificates" href="certificates-and-security.html">the section called “Certificates”</a> for details. This example also uses a Certificate Authority (CA). For information on generating a CA certificate see <a title="Certification Authority" href="certificates-and-security.html#certificate-authority">the section called “Certification Authority”</a>.<br />
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">You can get the digital certificate from a certificate authority. But unlike web clients, SMTP clients rarely complain about &#8220;self-signed certificates&#8221;, so alternatively, you can create the certificate yourself. Refer to <a title="Creating a Self-Signed Certificate" href="certificates-and-security.html#creating-a-self-signed-certificate">the section called “Creating a Self-Signed Certificate”</a> for more details.</td>
</tr>
</tbody>
</table>
</li>
<li>Once you have a certificate, configure Postfix to provide TLS encryption for both incoming and outgoing mail:
<pre>sudo postconf -e 'smtpd_tls_auth_only = no'
sudo postconf -e 'smtp_use_tls = yes'
sudo postconf -e 'smtpd_use_tls = yes'
sudo postconf -e 'smtp_tls_note_starttls_offer = yes'
sudo postconf -e 'smtpd_tls_key_file = /etc/ssl/private/server.key'
sudo postconf -e 'smtpd_tls_cert_file = /etc/ssl/certs/server.crt'
sudo postconf -e 'smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem'
sudo postconf -e 'smtpd_tls_loglevel = 1'
sudo postconf -e 'smtpd_tls_received_header = yes'
sudo postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
sudo postconf -e 'tls_random_source = dev:/dev/urandom'
sudo postconf -e 'myhostname = mail.example.com'</pre>
</li>
</ol>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">After running all the commands, <strong>Postfix</strong> is configured for SMTP-AUTH and a self-signed certificate has been created for TLS encryption.</td>
</tr>
</tbody>
</table>
<p>Now, the file <code>/etc/postfix/main.cf</code> should look like <a href="../sample/postfix_configuration" target="_top">this</a>.</p>
<p>The postfix initial configuration is complete. Run the following command to restart the postfix daemon:</p>
<p><strong>Postfix</strong> supports SMTP-AUTH as defined in <a href="ftp://ftp.isi.edu/in-notes/rfc2554.txt" target="_top">RFC2554</a>. It is based on <a href="ftp://ftp.isi.edu/in-notes/rfc2222.txt" target="_top">SASL</a>. However it is still necessary to set up SASL authentication before you can use SMTP-AUTH.</p>
<h3>Configuring SASL</h3>
<p>Postfix supports two SASL implementations Cyrus SASL and Dovecot SASL. To enable Dovecot SASL the <strong>dovecot-common</strong> package will need to be installed. From a terminal prompt enter the following:</p>
<pre><strong>sudo apt-get install dovecot-common</strong></pre>
<p>Next you will need to edit <code>/etc/dovecot/dovecot.conf</code>. In the <em>auth default</em> section uncomment the <em>socket listen</em> option and change the following:</p>
<pre>  socket listen {
    #master {
      # Master socket provides access to userdb information. It's typically
      # used to give Dovecot's local delivery agent access to userdb so it
      # can find mailbox locations.
      #path = /var/run/dovecot/auth-master
      #mode = 0600
      # Default user/group is the one who started dovecot-auth (root)
      #user =
      #group =
    #}
    client {
      # The client socket is generally safe to export to everyone. Typical use
      # is to export it to your SMTP server so it can do SMTP AUTH lookups
      # using it.
      path = /var/spool/postfix/private/auth-client
      mode = 0660
      user = postfix
      group = postfix
    }
  }</pre>
<p>In order to let <strong>Outlook</strong> clients use SMTPAUTH, in the <em>auth default</em> section of /etc/dovecot/dovecot.conf add <em>&#8220;login&#8221;</em>:</p>
<pre>  mechanisms = plain login</pre>
<p>Once you have <strong>Dovecot</strong> configured restart it with:</p>
<pre><strong>sudo /etc/init.d/dovecot restart</strong></pre>
<h3>Postfix-Dovecot</h3>
<p>Another option for configuring <strong>Postfix</strong> for SMTP-AUTH is using the <strong>dovecot-postfix</strong> package. This package will install<strong>Dovecot</strong> and configure <strong>Postfix</strong> to use it for both SASL authentication and as a Mail Delivery Agent (MDA). The package also configures <strong>Dovecot</strong> for IMAP, IMAPS, POP3, and POP3S.</p>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">You may or may not want to run IMAP, IMAPS, POP3, or POP3S on your mail server. For example, if you are configuring your server to be a mail gateway, spam/virus filter, etc. If this is the case it may be easier to use the above commands to configure Postfix for SMTPAUTH.</td>
</tr>
</tbody>
</table>
<p>To install the package, from a terminal prompt enter:</p>
<pre><strong>sudo apt-get install dovecot-postfix</strong></pre>
<p>You should now have a working mail server, but there are a few options that you may wish to further customize. For example, the package uses the certificate and key from the <strong>ssl-cert</strong> package, and in a production environment you should use a certificate and key generated for the host. See <a title="Certificates" href="certificates-and-security.html">the section called “Certificates”</a> for more details.</p>
<p>Once you have a customized certificate and key for the host, change the following options in <code>/etc/postfix/main.cf</code>:</p>
<pre>smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key</pre>
<p>Then restart Postfix:</p>
<pre><strong>sudo /etc/init.d/postfix restart</strong></pre>
<h3>Testing</h3>
<p>SMTP-AUTH configuration is complete. Now it is time to test the setup.</p>
<p>To see if SMTP-AUTH and TLS work properly, run the following command:</p>
<pre><strong>telnet mail.example.com 25</strong></pre>
<p>After you have established the connection to the postfix mail server, type:</p>
<pre>ehlo mail.example.com</pre>
<p>If you see the following lines among others, then everything is working perfectly. Type <strong>quit</strong> to exit.</p>
<pre>250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME</pre>
<h3>Troubleshooting</h3>
<p>This section introduces some common ways to determine the cause if problems arise.</p>
<h4>Escaping chroot</h4>
<p>The Ubuntu <strong>postfix</strong> package will by default install into a <em>chroot</em> environment for security reasons. This can add greater complexity when troubleshooting problems.</p>
<p>To turn off the chroot operation locate for the following line in the <code>/etc/postfix/master.cf</code> configuration file:</p>
<pre>smtp      inet  n       -       -       -       -       smtpd</pre>
<p>and modify it as follows:</p>
<pre>smtp      inet  n       -       n       -       -       smtpd</pre>
<p>You will then need to restart Postfix to use the new configuration. From a terminal prompt enter:</p>
<pre><strong>sudo /etc/init.d/postfix restart</strong></pre>
<h4>Log Files</h4>
<p><strong>Postfix</strong> sends all log messages to <code>/var/log/mail.log</code>. However error and warning messages can sometimes get lost in the normal log output so they are also logged to <code>/var/log/mail.err</code> and <code>/var/log/mail.warn</code> respectively.</p>
<p>To see messages entered into the logs in real time you can use the <strong>tail -f</strong> command:</p>
<pre><strong>tail -f /var/log/mail.err</strong></pre>
<p>The amount of detail that is recorded in the logs can be increased. Below are some configuration options for increasing the log level for some of the areas covered above.</p>
<ul>
<li>To increase <em>TLS</em> activity logging set the <em>smtpd_tls_loglevel</em> option to a value from 1 to 4.
<pre><strong>sudo postconf -e 'smtpd_tls_loglevel = 4'</strong></pre>
</li>
<li>If you are having trouble sending or receiving mail from a specific domain you can add the domain to the<em>debug_peer_list</em> parameter.
<pre><strong>sudo postconf -e 'debug_peer_list = problem.domain'</strong></pre>
</li>
<li>You can increase the verbosity of any <strong>Postfix</strong> daemon process by editing the <code>/etc/postfix/master.cf</code> and adding a <em>-v</em> after the entry. For example edit the <em>smtp</em> entry:
<pre>smtp      unix  -       -       -       -       -       smtp -v</pre>
</li>
</ul>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">It is important to note that after making one of the logging changes above the <strong>Postfix</strong> process will need to be reloaded in order to recognize the new configuration: <strong>sudo /etc/init.d/postfix reload</strong></td>
</tr>
</tbody>
</table>
<ul>
<li>To increase the amount of information logged when troubleshooting <em>SASL</em> issues you can set the following options in <code>/etc/dovecot/dovecot.conf</code>
<pre>auth_debug=yes
auth_debug_passwords=yes</pre>
</li>
</ul>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Just like <strong>Postfix</strong> if you change a <strong>Dovecot</strong> configuration the process will need to be reloaded: <strong>sudo /etc/init.d/dovecot reload</strong>.</td>
</tr>
</tbody>
</table>
<table border="0" summary="Note">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Some of the options above can drastically increase the amount of information sent to the log files. Remember to return the log level back to normal after you have corrected the problem. Then reload the appropriate daemon for the new configuration to take affect.</td>
</tr>
</tbody>
</table>
<h4>References</h4>
<p>Administering a <strong>Postfix</strong> server can be a very complicated task. At some point you may need to turn to the Ubuntu community for more experienced help.</p>
<p>A great place to ask for <strong>Postfix</strong> assistance, and get involved with the Ubuntu Server community, is the <em>#ubuntu-server</em> IRC channel on <a href="http://freenode.net" target="_top">freenode</a>. You can also post a message to one of the <a href="http://www.ubuntu.com/support/community/webforums" target="_top">Web Forums</a>.</p>
<p>For in depth <strong>Postfix</strong> information Ubuntu developers highly recommend: <a href="http://www.postfix-book.com/" target="_top">The Book of Postfix</a>.</p>
<p>Finally, the <a href="http://www.postfix.org/documentation.html" target="_top">Postfix</a> website also has great documentation on all the different configuration options available.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mnlinux.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mnlinux.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mnlinux.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mnlinux.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mnlinux.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mnlinux.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mnlinux.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mnlinux.wordpress.com/2613/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mnlinux.wordpress.com&amp;blog=7776074&amp;post=2613&amp;subd=mnlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mnlinux.wordpress.com/2010/01/15/postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbbe9b5666576d9813881948eb1f045?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aquaballoon</media:title>
		</media:content>
	</item>
	</channel>
</rss>
