From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Samuel Subject: Re: automount thru winscp Date: Fri, 09 Sep 2005 06:04:23 -0700 Message-ID: <43218857.3060303@bcgreen.com> 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: Luca Ferrari , linux-admin@vger.kernel.org You could placee the following in users' ~/.bashrc file: if [ -n "$SSH_CLIENT" -a -n '$DID_SSH_INIT" ] ; then export DID_SSH_INIT=yes engage_automount fi This doesn't differeentiate between ssh and scp, but it should be a good start. If you need to do something on exit, you can use trap 'exiting_ssh' EXIT Remember, however, that the user may be still logged in beyond this onee session 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? > Thanks, > Luca -- Stephen Samuel +1(604)876-0426 samuel@bcgreen.com http://www.bcgreen.com/~samuel/ Powerful committed communication. Transformation touching the jewel within each person and bringing it to light.