<?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/"
	>

<channel>
	<title>Michael Kolb Fulda&#187; Web Engineering</title>
	<atom:link href="http://www.michael-kolb.co.uk/tag/daemon/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michael-kolb.co.uk</link>
	<description>Web Engineering</description>
	<lastBuildDate>Mon, 01 Mar 2010 05:58:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ProFTPd authentification with MySQL</title>
		<link>http://www.michael-kolb.co.uk/webhosting/proftpd-authentification-with-mysql/</link>
		<comments>http://www.michael-kolb.co.uk/webhosting/proftpd-authentification-with-mysql/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 07:06:11 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=69</guid>
		<description><![CDATA[It&#8217;s very helpful to use the mysql authentification for proftpd. Especially if you manage a quite number of users. So you&#8217;re able to use a central database which manages the accounts.



First thing you need is an appropriate mysql schema that belongs your needs. This is my example:

CREATE TABLE ftp_users (
  username varchar(60) binary default [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s very helpful to use the <a href="http://www.michael-kolb.co.uk/tag/mysql">mysql</a> authentification for proftpd. Especially if you manage a quite number of users. So you&#8217;re able to use a central database which manages the accounts.</p>
<p><img class="size-medium wp-image-202 aligncenter"  src="http://www.michael-kolb.co.uk/wp-content/uploads/2008/12/proftpd.jpg" alt="proftpd with mysql" title="proftpd with mysql" width="301" height="241" class="alignnone size-medium wp-image-505" /></p>
<p><span id="more-69"></span></p>
<p>
First thing you need is an appropriate <a href="http://www.michael-kolb.co.uk/tag/mysql">mysql</a> schema that belongs your needs. This is my example:<br />
<br />
<code>CREATE TABLE ftp_users (<br />
  username varchar(60) binary default NULL,<br />
  uid int(11) default NULL,<br />
  gid int(11) default NULL,<br />
  password varchar(30) default NULL,<br />
  homedir varchar(250) default NULL,<br />
  count int(11) default NULL,<br />
  ui bigint(20) NOT NULL auto_increment,<br />
  shell varchar(60) default NULL,<br />
  last datetime default NULL,<br />
  allow char(1) default NULL,<br />
  PRIMARY KEY  (ui)<br />
) TYPE=ISAM PACK_KEYS=1;<br />
<br />
CREATE TABLE xfer_stat (<br />
  username tinytext,<br />
  filename text,<br />
  size bigint(20) default NULL,<br />
  host tinytext,<br />
  ip tinytext,<br />
  action tinytext,<br />
  durability tinytext,<br />
  local_time datetime default NULL,<br />
  success char(1) default NULL,<br />
  ui bigint(20) NOT NULL auto_increment,<br />
  PRIMARY KEY  (ui)<br />
) TYPE=MyISAM;<br />
</code></p>
<p>
Be sure to have installed all required <a href="http://www.michael-kolb.co.uk/tag/linux/">linux</a> packages:<br />
</p>
<p><code>apt-get -y install mysql-client-5.0<br />
apt-get -y install mysql-server-5.0<br />
apt-get -y install mysql-common<br />
apt-get -y install proftpd-mysql</code></p>
<p>Last thing to do is adapting the /etc/proftpd.conf for acessing <a href="http://www.michael-kolb.co.uk/tag/mysql">mysql</a> tables. You will find the lines at end of the configuration file. Please insert your passwords:</p>
<p><code><br />
DefaultRoot ~<br />
RequireValidShell off<br />
<br />
SQLAuthTypes            Plaintext Crypt<br />
SQLAuthenticate         users* groups*<br />
SQLConnectInfo          mysqluser@127.0.0.1 mysqluser mysqlpassword<br />
SQLUserInfo               ftp_users username password uid gid homedir shell<br />
SQLGroupInfo             ftp_groups groupname gid members<br />
SQLUserWhereClause      "login_enabled = 'Y'"<br />
<br />
SQLLogFile /var/log/ftp/proftpd.sql.log<br />
<br />
SQLLog PASS login<br />
SQLNamedQuery login UPDATE "last_login=now(), login_count=login_count+1 WHERE username='%u'" ftp_users<br />
<br />
SQLLog RETR download<br />
SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b WHERE username='%u'" ftp_users<br />
<br />
SQLLog STOR upload<br />
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users<br />
</code></p>
<p>Helpful link:<br />
<a href="http://www.proftpd.de/HowTo-SQL.29.0.html" target="_blank">http://www.proftpd.de/HowTo-SQL.29.0.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/webhosting/proftpd-authentification-with-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing ssh port to improve security</title>
		<link>http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/</link>
		<comments>http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:55:44 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=327</guid>
		<description><![CDATA[For security reasons, it&#8217;s advisable to change the ssh standard port 22 into something else. So you will get less attacks to sshd. This improves the security for your server. Furthermore, you should block root from connecting via ssh.
Open your /etc/ssh/sshd_config
Changing the port:

# This is the sshd server system-wide configuration file.  See sshd(8)
# for [...]]]></description>
			<content:encoded><![CDATA[<p>For <a href="http://www.michael-kolb.co.uk/tag/security">security</a> reasons, it&#8217;s advisable to change the ssh standard port 22 into something else. So you will get less attacks to sshd. This improves the security for your server. Furthermore, you should block root from connecting via ssh.</p>
<p>Open your /etc/ssh/sshd_config<br />
Changing the port:<br />
<code><br />
# This is the sshd server system-wide configuration file.  See sshd(8)<br />
# for more information.</code></p>
<p># change the port configuration &#8211; for example to 2233<br />
Port 2233<br />
Protocol 2</p>
<p><span id="more-327"></span></p>
<p>And blocking user root<br />
<code><br />
#<br />
PermitRootLogin without-password<br />
PermitRootLogin no<br />
#<br />
</code><br />
You need to restart the sshd <a href="http://www.michael-kolb.co.uk/tag/script/">script</a> with <strong>/etc/init.d/sshd restart</strong> Please stay logged in as root, before you&#8217;ve tested the new ssh &#8211; connect with a second console.</p>
<p>Now create an user account with lower permissions than root. Use this account to connect your server via ssh, followed by the &#8220;su&#8221; command to get root permissions.</p>
<p><code><br />
useradd -u 999 -g 100 remotessh -d /home/remotessh -s /bin/bash<br />
</code></p>
<p>Connecting your server with the new port:<br />
<code><br />
ssh -P 2233 yourserver.com -l remotessh<br />
</code></p>
<p>Setting up a firewall with iptables to improve systems security will bei shown in this <a href="http://www.michael-kolb.co.uk/linuxdaemons/scripting-a-firewall-with-iptables/" alt="iptables" target="_top">article</a></p>
<p><strong>Helpful links:</strong></p>
<ul>
<li>
Using keychains to avoid typing passwords again and again.<br />
<a href="http://blog.synatic.net/2008/3/29/easy-ssh-authentication-with-keychain" target="_blank">http://blog.synatic.net/2008/3/29/easy-ssh-authentication-with-keychain</a>.
</li>
<li>
A nice how-to for creating strong passwords:<br />
<a href="http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/" target="_blank">http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
