<?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>Cow Computing &#187; User Account</title>
	<atom:link href="http://www.cowcomputing.com/tag/user-account/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cowcomputing.com</link>
	<description>Share Info about Cloud Computing &#38; Programming</description>
	<lastBuildDate>Thu, 22 Jul 2010 17:10:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Jailkit &#8211; Limit User Account on Linux</title>
		<link>http://www.cowcomputing.com/2010/03/12/jailkit-limit-user-account-on-linux/</link>
		<comments>http://www.cowcomputing.com/2010/03/12/jailkit-limit-user-account-on-linux/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 07:16:07 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[chroot]]></category>
		<category><![CDATA[User Account]]></category>

		<guid isPermaLink="false">http://www.cowcomputing.com/?p=201</guid>
		<description><![CDATA[There&#8217;s once I was required to setup a limited shell access user account on a commercial hardware product, in which to secure the original system from being modified and at the same time to provide a flexible environment for general work. I was on the way to make use of chroot command. Then i was [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s once I was required to setup a limited shell access user account on a commercial hardware product, in which to secure the original system from being modified and at the same time to provide a flexible environment for general work. I was on the way to make use of chroot command. Then i was lucky to came across <a href="http://olivier.sessink.nl/jailkit">Jailkit</a>, which saved me a lot of time. So, i would like to use this post to give a little introduction on how to use it.</p>
<pre class="brush:bash"># First, let's create a directory for the jail account
mkdir /jail
chown root:root /jail

# Then we create a new user account specially for jail account
# *replace &lt;group name&gt;, &lt;username&gt;, &lt;password&gt; with your own value
groupadd &lt;group name&gt;
useradd -d /home/jail -g &lt;group name&gt; -p &lt;password&gt; &lt;username&gt;

# For example, if we only want to allow the jail account to have ssh and basic shell access
jk_init -v -j /jail basicshell ssh

# Then we shall jail the user account we previously created to the jail directory
jk_jailuser -m -j /jail &lt;username&gt;
</pre>
<p><span id="more-201"></span><br />
Now the jail account and file system is ready, however if you want more control, we can do the following.</p>
<pre class="brush:bash"># OPTIONAL: Edit /jail/etc/passwd file and /jail/etc/group file to further limit the access
# The following further limit the user logged in jail account to have only access to bash
# Assume the jail user account &amp; group = jail_user, and we edit the passwd file
jail_user:x:1016:1016:/home/jail:/bin/bash

# edit group file
jail_user:x:1016
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cowcomputing.com/2010/03/12/jailkit-limit-user-account-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
