select * from section<?xml version='1.0' encoding='iso-8859-1' ?>
<article>
<id><![CDATA[8]]>></id>
<author><nick><![CDATA[Juan M. Casillas]]>></nick>
<email><![CDATA[juanm.casillas@jmcresearch.com]]>></email>
></author>
<title><![CDATA[Adding users to the Jail]]>></title>
<subtitle><![CDATA[Or how to invoke addjailuser]]>></subtitle>
<body><![CDATA[&lt;p&gt;
addjailuser edit the chrooted /etc/passwd automatically, creates the user directories,
addjailuser has been written in perl script. This are the command line arguments: 
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;addjailuser&lt;/b&gt; chrootdir userdir usershell username 
&lt;table  border=1 width=100% cellpadding=5 class=thinborder&gt;

&lt;tr bgcolor=&quot;#f0f0f0&quot;&gt;
   &lt;td class=thinborder_title&gt;&lt;b&gt;Argument&lt;/b&gt;&lt;/td&gt;
   &lt;td class=thinborder_title width=60%&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
 &lt;td&gt;chrootdir&lt;/td&gt;
 &lt;td&gt;
     The directory where the chrooted environment will live. It its the home 
     entry in the non-chrooted /etc/passwd file&lt;/td&gt;
&lt;/tr&gt;   

&lt;tr&gt;
 &lt;td&gt;userdir&lt;/td&gt;
 &lt;td&gt;
     The directory inside the chrooted enviroment when the user will live,
     in our example, /home/user3.
     &lt;/td&gt;
&lt;/tr&gt;   

&lt;tr&gt;
 &lt;td&gt;usershell&lt;/td&gt;
 &lt;td&gt;
     The user?s shell full path (e.g. /bin/bash)
&lt;/td&gt;
&lt;/tr&gt;   

&lt;tr&gt;
 &lt;td&gt;username&lt;/td&gt;
 &lt;td&gt;The user?s name. In our example, user3&lt;/td&gt;
&lt;/tr&gt;   

&lt;/table&gt;

&lt;p&gt;
&lt;b&gt;Invocation example: &lt;/b&gt;
&lt;p&gt;&lt;pre&gt;addjailuser /var/chroot /home/user3 /bin/bash user3&lt;/pre&gt;&lt;/p&gt;

This will add a user under the directory /var/chroot
setups the home directory of the user3 into /home/user3, and selects /bin/bash
as default shell for user3. Also edits the chrooted /etc/passwd, /etc/group
and /etc/shadow to configure propertly jail.
&lt;/p&gt;
&lt;/p&gt;
]]>></body>
<keywords><![CDATA[jail  configuration add user]]>></keywords>
<stamp><![CDATA[1061910648]]>></stamp>
<updated><![CDATA[1070911507]]>></updated>
<language><![CDATA[0]]>></language>
<sections><section><![CDATA[Jail]]></section>
></sections>
<site><![CDATA[http://www.jmcresearch.com]]>></site>
<url><![CDATA[http://www.jmcresearch.com//src/articlehelper.php?action=preview&amp;id=8]]>></url>
</article>