<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lock user in home [solved]]]></title><description><![CDATA[<p dir="auto">Dear community.</p>
<p dir="auto">I have a user account on pfsense that needs to copy files dropped in his home directory via sftp.</p>
<p dir="auto">I create a new user on the webGUI with " User - System - Shell account access" permissions.</p>
<p dir="auto">However, I'd like to lock the user into that directory, so I chown'ed the home directory to root and added the following to /etc/sshd:</p>
<pre><code>
	/* Test jail settings */
	$sshconf .= "Match User test_jailed\n";
    $sshconf .= "\tChrootDirectory /home/bupo\n";
	$sshconf .= "\tForceCommand internal-sftp\n";

</code></pre>
<p dir="auto">This works like a charm, but for obvious reasons is cumbersome (I'd like not to edit the sshd php file every time).<br />
Is there a way to do this form the webGUI or at least a way to specify extra lines for sshd_config?</p>
]]></description><link>https://forum.netgate.com/topic/44552/lock-user-in-home-solved</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 09:20:35 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/44552.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 May 2012 09:58:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 21:08:18 GMT]]></title><description><![CDATA[<p dir="auto">There is an option with wget without using scp.<br />
http://doc.pfsense.org/index.php/Remote_Config_Backup</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/namezero111111">@<bdi>namezero111111</bdi></a>:</p>
<blockquote>
<p dir="auto">Afaik, there is a backup package that does exactly that. It needs a subscription however, but I would assume that it is safe.<br />
A lot of companies (like mine) probably would have a problem though having their firewall configs backed up in a cloud</p>
</blockquote>
<p dir="auto">It encrypts the config before uploading, so we strictly store encrypted blobs, we have no readable configs. It's as safe as your encryption key is strong, plus requiring another account just to get to your encrypted configs.</p>
]]></description><link>https://forum.netgate.com/post/334277</link><guid isPermaLink="true">https://forum.netgate.com/post/334277</guid><dc:creator><![CDATA[cmb]]></dc:creator><pubDate>Wed, 02 May 2012 21:08:18 GMT</pubDate></item><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 19:18:23 GMT]]></title><description><![CDATA[<p dir="auto">Afaik, there is a backup package that does exactly that. It needs a subscription however, but I would assume that it is safe.<br />
A lot of companies (like mine) probably would have a problem though having their firewall configs backed up in a cloud, but for SMB or home users this might be viable.<br />
I don't know the pricing though.</p>
]]></description><link>https://forum.netgate.com/post/334244</link><guid isPermaLink="true">https://forum.netgate.com/post/334244</guid><dc:creator><![CDATA[namezero111111]]></dc:creator><pubDate>Wed, 02 May 2012 19:18:23 GMT</pubDate></item><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 19:07:11 GMT]]></title><description><![CDATA[<p dir="auto">IMHO a safe way to automatically backup config.xml would be an useful feature in the base pfsense install.</p>
]]></description><link>https://forum.netgate.com/post/334241</link><guid isPermaLink="true">https://forum.netgate.com/post/334241</guid><dc:creator><![CDATA[dhatz]]></dc:creator><pubDate>Wed, 02 May 2012 19:07:11 GMT</pubDate></item><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 18:53:55 GMT]]></title><description><![CDATA[<p dir="auto">Yes, of course it is. The only reason I was making sure it was a good idea was should the server for example collect configs from 20 machines and be compromised, I wouldn't want anyone to be able to do much with the credentials on the pfsense machine.</p>
<p dir="auto">Thanks again!</p>
]]></description><link>https://forum.netgate.com/post/334239</link><guid isPermaLink="true">https://forum.netgate.com/post/334239</guid><dc:creator><![CDATA[namezero111111]]></dc:creator><pubDate>Wed, 02 May 2012 18:53:55 GMT</pubDate></item><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 17:35:53 GMT]]></title><description><![CDATA[<p dir="auto">ah, that's much more reasonable. I expected you were using the firewall like a file server or something, that could potentially pose issues with untrusted users. But doing so for just a backup account, which I presume will run from a secure server, is very low risk with the changes you've made there.</p>
]]></description><link>https://forum.netgate.com/post/334223</link><guid isPermaLink="true">https://forum.netgate.com/post/334223</guid><dc:creator><![CDATA[cmb]]></dc:creator><pubDate>Wed, 02 May 2012 17:35:53 GMT</pubDate></item><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 15:06:45 GMT]]></title><description><![CDATA[<p dir="auto">Well the reason is that I'd like a backup operator be able to pull a config.xml backup every night, which I could copy to their home directory via cron. Hence that user / service account wouldn't be entirely untrusted, but should not be able to harm the system should anything happen to the account (i.e. they shouldn't be able to modify the configuration).<br />
Would that be unreasonable in your opinion?</p>
<p dir="auto">As I said, I found the place in /etc/sshd where the /etc/ssh/sshd_config file is generated and added the lines seen in my first entry.<br />
But I assume there is no easier way short of developing a small package for the community to add custom lines to sshd_config, right?</p>
]]></description><link>https://forum.netgate.com/post/334181</link><guid isPermaLink="true">https://forum.netgate.com/post/334181</guid><dc:creator><![CDATA[namezero111111]]></dc:creator><pubDate>Wed, 02 May 2012 15:06:45 GMT</pubDate></item><item><title><![CDATA[Reply to Lock user in home [solved] on Wed, 02 May 2012 11:20:19 GMT]]></title><description><![CDATA[<p dir="auto">I'd recommend against allowing any users shell access who wouldn't be trusted with more or less full access, even if you're chrooting and forcing sftp (though you should be reasonably safe doing that).</p>
<p dir="auto">That said, grep /etc/inc/ for sshd_config and you'll find where it's generated and can edit the source.</p>
]]></description><link>https://forum.netgate.com/post/334114</link><guid isPermaLink="true">https://forum.netgate.com/post/334114</guid><dc:creator><![CDATA[cmb]]></dc:creator><pubDate>Wed, 02 May 2012 11:20:19 GMT</pubDate></item></channel></rss>