DevHeads.net

command to execute

Hi all.
I need to run a simple script ... basically a chmod... when each sftp user
log in into a sftp server.
I tried /etc/profile.d/ etc etc but nothing is working.

Running ubuntu 16.04.

Cheers

Comments

Re: command to execute

By Alfredo De Luca at 06/12/2018 - 04:16

Hi all...any clue on this?

cheers

On Mon, Jun 11, 2018 at 10:44 PM Alfredo De Luca <alfredo. ... at gmail dot com>
wrote:

Re: command to execute

By Oliver Grawert at 06/12/2018 - 10:24

hi,
Am Dienstag, den 12.06.2018, 10:16 +0200 schrieb Alfredo De Luca:
<a href="http://manpages.ubuntu.com/manpages/xenial/man7/pam-script.7.html" title="http://manpages.ubuntu.com/manpages/xenial/man7/pam-script.7.html">http://manpages.ubuntu.com/manpages/xenial/man7/pam-script.7.html</a>

ciao
oli

Re: command to execute

By Ken D'Ambrosio at 06/12/2018 - 11:00

HOLY CROW. I had no idea such a thing even existed -- that's awesome!
Thanks kindly!

-Ken

Re: command to execute

By Alfredo De Luca at 06/12/2018 - 11:06

Thanks guys. I evaluated the pam stuff.... ( also there is
<a href="http://www.linux-pam.org/Linux-PAM-html/sag-pam_exec.html" title="http://www.linux-pam.org/Linux-PAM-html/sag-pam_exec.html">http://www.linux-pam.org/Linux-PAM-html/sag-pam_exec.html</a>) but for us
doesn\t work..
I ll figure out something else.

Cheers guys and thanks again

Re: command to execute

By Ken D'Ambrosio at 06/12/2018 - 10:10

Unfortunately, I don't have time to dig in right now, but what you're
looking to do MIGHT be possible with the ~/.ssh/config file by way of
the LocalCommand directive (see the ssh_config manpage for more). Be
sure to take note of the fact that this needs to be enabled server-side
by the PermitLocalCommand directive. I know that this would work for
SSH; I'm unsure about SCP, but it's as close to an (easy/elegant)
solution as I can think.

-Ken