From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Adam T. Bowen" Subject: Re: automount thru winscp Date: Fri, 09 Sep 2005 11:01:13 +0100 Message-ID: <43215D69.7030604@agitate.org.uk> References: <4320775D.20602@infinito.it> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4320775D.20602@infinito.it> Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-admin@vger.kernel.org Hi, Luca Ferrari wrote: > Hi, > I've got a linux server with samba shares behind a firewall. Since my > users want to see their shares from the outside network, I thought to > dynamically mount shares on the firewall (using, for example, automount) > providing access thru winscp, that has a quite windows like look & > feel. The problem is that I cannot understand when the user connects, > that means automount does not work with a winscp session, and that I > cannot mount shares thru the ~/.bash_profile script, since it is not > executed (maybe .profile is executed?). Any idea on how to solve the > problem? Allowing external sFTP connections for normal users to your firewall box is not a good idea with regard to security, but if that is what you want. As far as I know, your SHELL is used to execute the sftp-server process once you have authenticated via the ssh daemon (using OpenSSH which is all I have experience of). So you just need to work out which of the numerous shell initialization scripts is actually read. On our systems with SHELL as bash, the ~/.bashrc is read so you could put the smbmount commands in there. I just tried doing this myself and it works ok. One thing I had to do was export PASSWD=mypassword before the smbmount command. Very insecure, but perhaps you have your shares/authentication configured to do it without this step. Cheers Adam > Thanks, > Luca